An extremely important requested feature for QSForex has been the ability to backtest over multiple days. Previously the system only supported backtesting via a single file. This was not a scalable solution as such a file must be read into memory and subsequently into a Pandas DataFrame. While the tick data files produced are not huge (roughly 3.5Mb each), they do add up quickly if we consider multiple pairs over periods of months or more.
In particular I would like to make the system a lot faster, since it will allow parameter searches to be carried out in a reasonable time. While Python is a great tool, it's one drawback is that it is relatively slow when compared to C/C++. Hence I will be carrying out a lot of profiling to try and improve the execution speed of both the backtest and the performance calculations.
Forex trading, also known as foreign exchange trading or currency trading, is where an investor tries to make money by buying and selling currencies on the foreign exchange market. Most investors will follow trends and use strategies to optimise their return. This is a very basic definition that does not reflect the full complexity of Forex trading; our free workshops are ideal for people who are unfamiliar with the concept and want to quickly achieve an in-depth insight into how this all works.
As you may now come to understand, FX margins are one of the key aspects of Forex trading that must not be overlooked, as they can potentially lead to unpleasant outcomes. In order to avoid them, you should understand the theory concerning margins, margin levels and margin calls, and apply your trading experience to create a viable Forex strategy. Indeed a well developed approach will undoubtedly lead you to trading success in the end.
Once an investor has started buying a stock on margin, the NYSE and FINRA require that a minimum amount of equity be maintained in the investor's margin account. These rules require investors to have at least 25% of the total market value of the securities they own in their margin account. This is called the maintenance margin. For market participants identified as pattern day traders, the maintenance margin requirement is a minimum of $25,000 (or 25% of the total market value of the securities, whichever is higher).
© 2019 Learn to Trade Pty Ltd (ACN:138178542, AFSL:339557) provides general information and educational courses and materials only. This is not an offer to buy/sell financial products. We do not provide personal advice nor do we consider the needs, objectives or circumstances of any individual. Financial products are complex and all entail risk of loss. Over-the-counter derivative and foreign exchange products are considered speculative because they are highly leveraged and carry risk of loss beyond your initial investment, hence should only be traded with capital you can afford to lose. Please ensure you obtain professional advice to ensure trading or investing in any financial products is suitable for your circumstances, and ensure you obtain, read and understand any applicable offer document.
We also apply a concentrated margining requirement to Margin accounts. An account's two largest positions and their underlying derivatives will be re-valued using the worst case scenario within a +/- 30% scanning range. The remaining positions will be re-valued based upon a move of +/-5%. If the concentrated margining requirement exceeds that of the standard rules based margin required, then the newly calculated concentrated margin requirement will be applied to the account.
Robust Strategies - I have only demonstrated some simple random signal generating "toy" strategies to date. Now that we are beginning to create a reliable intraday forex trading system, we should start carrying out some more interesting strategies. Future diary entries will concentrate on strategies drawn from a mixture of "technical" indicators/filters as well as time series models and machine learning techniques.
Risk Management - Many "research" backtests completely ignore risk management. Unfortunately this is generally necessary for brevity in describing the rules of a strategy. In reality we -must- use a risk overlay when trading, otherwise it is extremely likely that we will suffer a substantial loss at some stage. This is not to say that risk management can prevent this entirely, but it certainly makes it less likely!
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.
Popular leverage ratios in Forex trading include 1:10, 1:50, 1:100, 1:200, or even higher. Simply put, the leverage ratio determines the position size you’re allowed to take based on the size of your trading account. For example, a 1:100 leverage allows you to open a position 10 times higher than your trading account size, i.e., if you have $1,000 in your account, you can open a position worth $10,000. Similarly, a leverage ratio of 1:100 allows you to open a position size 100 times larger than your trading account size. With $1,000 in your trading account, you could open a position worth $100,000!
All currency trading is done in pairs. Unlike the stock market, where you can buy or sell a single stock, you have to buy one currency and sell another currency in the forex market. Next, nearly all currencies are priced out to the fourth decimal point. A pip or percentage in point is the smallest increment of trade. One pip typically equals 1/100 of 1 percent.
Free Margin – Your free margin represents your total equity minus any margin used for leveraged trades. For example, if your equity is $1,000 and your used margin is $100, your free margin would amount to $900. Following your free margin is extremely important, as it is used to withstand negative price fluctuations from your open trades and to open new leveraged trades. It’s important to understand that your free margin increases with profitable positions, but decreases with your losing positions. Once the free margin drops to zero or below, your broker will activate the so-called margin call and close all your open positions at the current market rate, in order to prevent your equity from falling below the required margin.
Trading foreign exchange on margin carries a high level of risk, and may not be suitable for everyone. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. Remember, you could sustain a loss of some or all of your initial investment, which means that you should not invest money that you cannot afford to lose. If you have any doubts, it is advisable to seek advice from an independent financial advisor.