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.
Local Portfolio Handling - In my opinion carrying out a backtest that inflates strategy performance due to unrealistic assumptions is annoying at best and extremely unprofitable at worst! Introducing a local portfolio object that replicates the OANDA calculations means that we can check our internal calculations while carrying out practice trading, which gives us greater confidence when we later use this same portfolio object for backtesting on historical data.