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.
Now that we have discussed the longer term plan I want to present some of the changes I have made to the code since diary entry #2. In particular, I want to describe how I modified the code to handle the Decimal data-type instead of using floating point storage. This is an extremely important change as floating point representations are a substantial source of long-term error in portfolio and order management systems.
In addition, I've had some comments from people suggesting that they'd like to see more varied order types than the simple Market Order. For carrying out proper HFT strategies against OANDA we are going to need to use Limit Orders. This will probably require a reworking of how the system currently executes trades, but it will allow a much bigger universe of trading strategies to be carried out.
Options involve risk and are not suitable for all investors. For more information read the "Characteristics and Risks of Standardized Options". For a copy call Interactive Brokers' Client Services on 312-542-6901. Before trading, clients must read the relevant risk disclosure statements on our Warnings and Disclosures page - http://www.interactivebrokers.com/disclosures. Trading on margin is only for sophisticated investors with high risk tolerance. You may lose more than your initial investment. For additional information regarding margin loan rates, see http://www.interactivebrokers.com/interest. Security futures involve a high degree of risk and are not suitable for all investors. The amount you may lose may be greater than your initial investment. Before trading security futures, read the Security Futures Risk Disclosure Statement. For a copy visit http://www.interactivebrokers.com/disclosures. Structured products and fixed income products such as bonds are complex products that are more risky and are not suitable for all investors. Before trading, please read the Risk warning and Disclosure Statement at http://www.interactivebrokers.com/disclosures. There is a substantial risk of loss in foreign exchange trading. The settlement date of foreign exchange trades can vary due to time zone differences and bank holidays. When trading across foreign exchange markets, this may necessitate borrowing funds to settle foreign exchange trades. The interest rate on borrowed funds must be considered when computing the cost of trades across multiple markets.
Now, let’s say you open a trade worth $50,000 with the same trading account size and leverage ratio. Your required margin for this trade would be $500 (1% of your position size), and your free margin would now also amount to $500. In other words, you could withstand a negative price fluctuation of $500 until your free margin falls to zero and causes a margin call. Your position size of $50,000 could only fall to $49,500 – this would be the largest loss your trading account could withstand.
For securities, the definition of margin includes three important concepts: the Margin Loan, the Margin Deposit and the Margin Requirement. The Margin Loan is the amount of money that an investor borrows from his broker to buy securities. The Margin Deposit is the amount of equity contributed by the investor toward the purchase of securities in a margin account. The Margin Requirement is the minimum amount that a customer must deposit and it is commonly expressed as a percent of the current market value. The Margin Deposit can be greater than or equal to the Margin Requirement. We can express this as an equation: