Slippage Handling - The system is currently generating a lot of slippage due to the high-frequency nature of the tick data provided from OANDA. This means that the portfolio balance calculated locally is not reflecting the balance calculated by OANDA. Until correct event-handling and slippage adjustment is carried out, this will mean that a backtest will not correctly reflect reality.
To date, we've been experimenting with the OANDA Rest API in order to see how it compared to the API provided by Interactive Brokers. We've also seen how to add in a basic portfolio replication element as the first step towards a proper event-driven backtesting system. I've also had some helpful comments on both previous articles (#1 and #2), which suggests that many of you are keen on changing and extending the code yourselves.
Borrowing money to purchase securities is known as "buying on margin". When an investor borrows money from his broker to buy a stock, he must open a margin account with his broker, sign a related agreement and abide by the broker's margin requirements. The loan in the account is collateralized by investor's securities and cash. If the value of the stock drops too much, the investor must deposit more cash in his account, or sell a portion of the stock.
© Forex Factory 2020. All rights reserved. The Forex Factory calendar changes frequently to reflect the latest information. For the most up to date calendar, please visit https://www.forexfactory.com/calendar.php. Forex Factory takes no responsibility for decisions based on this information, please see our terms of service at https://www.forexfactory.com/legal.php.
The Forex market is one of a number of financial markets that offer trading on margin through a Forex margin account. Many traders are attracted to the Forex market because of the relatively high leverage that Forex brokers offer to new traders. But, what are leverage and margin, how are they related, and what do you need to know when trading on margin? This and more will be covered in the following lines.
Margin requirements for futures and futures options are established by each exchange through a calculation algorithm known as SPAN margining. SPAN (Standard Portfolio Analysis of Risk) evaluates overall portfolio risk by calculating the worst possible loss that a portfolio of derivative and physical instruments might reasonably incur over a specified time period (typically one trading day.) This is done by computing the gains and losses that the portfolio would incur under different market conditions. The most important part of the SPAN methodology is the SPAN risk array, a set of numeric values that indicate how a particular contract will gain or lose value under various conditions. Each condition is called a risk scenario. The numeric value for each risk scenario represents the gain or loss that that particular contract will experience for a particular combination of price (or underlying price) change, volatility change, and decrease in time to expiration.
Trading on margin is extremely popular among retail Forex traders. It allows you to open a much larger position than your initial trading account would otherwise allow, by allocating only a small portion of your trading account as the margin, or collateral for the trade. Trading on margin also carries certain risks, as both your profits and losses are magnified.