The script is currently hardcoded to generate forex data for the entire month of January 2014. It uses the Python calendar library in order to ascertain business days (although I haven't excluded holidays yet) and then generates a set of files of the form BBBQQQ_YYYYMMDD.csv, where BBBQQQ will be the specified currency pair (e.g. GBPUSD) and YYYYMMDD is the specified date (e.g. 20140112).
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.
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.
Margin calls are mechanisms put in place by your Forex broker in order to keep your used margin secure. Remember, your used margin is allocated by your broker as the collateral for funds borrowed from your broker. A margin call happens when your free margin falls to zero, and all you have left in your trading account is your used, or required margin. When this happens, your broker will automatically close all open positions at current market rates.
Have you always dreamed of financial freedom? Maybe you want to start your own business and need a way to supplement the income it brings in. It doesn’t matter what your goals are – Forex trading may be the solution you have been looking for. This high-reward, high-risk market has plenty of opportunities for the patient, insightful investor. You do not need to spend all day researching and watching the market; currency trading only requires you to dedicate a small portion of each day to it, leaving you with more time to spend following your dreams!
In particular I've made the interface for beginning a new backtest a lot simpler by encapsulating a lot of the "boilerplate" code into a new Backtest class. I've also modified the system to be fully workable with multiple currency pairs. In this article I'll describe the new interface and show the usual Moving Average Crossover example on both GBP/USD and EUR/USD.
Often, closing one losing position will take the margin level Forex higher than 5%, as it will release the margin of that position, so the total used margin will decrease and consequently the margin level will increase. The system often takes the margin level higher than 5%, by closing the biggest position first. If your other losing positions continue losing and the margin level reaches 5% once more, the system will just close another losing position.
If traders are positive on the prospects for the Yen, they would expect the number on the right to go down – i.e. the Yen would be getting stronger against the Dollar. Traders would be buying less Yen with a Dollar as the Yen got stronger. Similarly, if the Yen was expected to weaken, forex traders would expect the Yen number to go up, reflecting the fact that the dollar could buy more yen.