Quote from Pippi436:
I agree that hedging the currency exposure when trading in assets denominated in a foreign currency is a reasonable thing to do.
Yes, i would prefer what you call a 'dynamic' exchange rate. Suppose you trade a portfolio of american and european stocks. On one hand TZ does a very accurate simulation of every tick but on the other hand it looses much of its precision when calculating the actual PnL - if you use a static exchange-rate (your european PnL would be off by a factor between 1 and 1.6 in the last 5 years).
The way it should work in my opinion is that you can define a currency for each instrument (and in the case of a FX pair both the base- and the quote-currency) and the PnL should settle immediately in the account base currency (mine would be EUR) - using the then prevailing conversion rate. I think every product that advertises portfolio capability should be able to deal with this - yet all software i am aware of fails in that aspect miserably.
Pippi, every effort has been made in TickZOOM to separate the "engine" logic from the rest of the system which includes custom trading rules, performance stats, optimization algorithm, graphical interface, etc.
The engine focuses on the complex and job of converting ticks into bars at high speed and calling out to your custom trading models at the intervals they request.
In other words, all the complexity of the high speed is hidden from those parts of the system and self contained in the engine.
So going even beyond the benefits of open source, it also means you can add formulas (like conversion) etc. into those parts of the system.
What you describe sounds like a perform thing to start as part of a community set of functions available.
The reason I asked if you want dynamic or static is because the engine will need to add the ability to handle multiple instruments simultaneously. That will be a minor enhancements since architecturally it can handle this. It just needs some minor modifications and then plenty of testing and regression testing.
NOTE: I'm curious as on optimization do you need a "per tick" adjustment of the currency? I think you alluded to some less granular like per minute? per hour? per day?
The reason is that add a few currency instruments to your stock tick data will impact your performance in historical testing.
It might make sense to only use 1 hour bars for exchange rate, for example which would greatly improve performance.
Those type of adjustments would involve a little work in the engine to make it all work seamlessly. But the actual calculations would still occur outside the engine in custom or common code.
Wayne