In particular we need to modify -every- value that appears in a Position calculation to a Decimal data-type. This includes the units, exposure, pips, profit and percentage profit. This ensures we are in full control of how rounding issues are handled when dealing with currency representations that have two decimal places of precision. In particular we need to choose the method of rounding. Python supports a few different types, but we are going to go with ROUND_HALF_DOWN, which rounds to the nearest integer with ties going towards zero.
If you sell a security short, you must have sufficient equity in your account to cover any fees associated with borrowing the security. If you borrow the security through us, we will borrow the security on your behalf and your account must have sufficient collateral to cover the margin requirements of the short sale. To cover administrative fees and stock borrowing fees, we must post 102% of the value of the security borrowed as collateral with the lender. In instances in which the security shorted is hard to borrow, borrowing fees charged by the lender may be so high (greater than the interest earned) that the short seller must pay additional interest for the privilege of borrowing a security. Customers may view the indicative short stock interest rates for a specific stock through the Short Stock (SLB) Availability tool located in the Tools section of their Account Management page. For more information concerning shorting stocks and associated fees, visit our Stock Shorting page.
tweet at 3:44pm: [RTRS] - U.S. CDC DIRECTOR REDFIELD SAYS RISK TO U.S. PUBLIC FROM CORONAVIRUS OUTBREAK IS LOW tweet at 3:46pm: REDFIELD SAYS THERE ARE 191 INDIVIDUALS UNDER INVESTIGATION IN U.S. AMID CORONAVIRUS OUTBREAK tweet at 3:45pm: US CDC Director Redfield: This is a significant global situation. https://t.co/Ao1Ci2OEfi tweet at 3:52pm: US declares the coronavirus a public health emergency, implementing special temporary measures $SPX
Currency markets are important to a broad range of participants, from banks, brokers, hedge funds and investor traders who trade FX. Any company that operates or has customers overseas will need to trade currency. Central banks can also be active in currency markets, as they seek to keep the currency they are responsible for trading within a specific range.
The "philosophy" of the forex trading system, as with the rest of the QuantStart site, is to try and mimic real-life trading as much as possible in our backtesting. This means including the details that are often excluded from more "research oriented" backtesting situations. Latency, server outages, automation, monitoring, realistic transaction costs will all be included within the models to give us a good idea of how well a strategy is likely to perform.
The market values/prices used to compute the equity or margin requirement in an Interactive account may differ from the price disseminated by exchanges or other market data sources, and may represent Interactive's valuation of the product. Among other things, Interactive may calculate its own index values, Exchange Traded Fund values or derivatives values, and Interactive may value securities or futures or other investment products based on bid price, offer price, last sale price, midpoint or using some other method. Interactive may use a valuation methodology that is more conservative than the marketplace as a whole.