To properly develop my trading strategies I need to find a way to calculate maximum theoretical income made from trading time series with perfect accuracy (i.e. trading while holding 'crystal ball' and knowing future) with given trading fees.
So, let's say formally, I'm looking for an algorithm, at which..
- Historical time series 'T' (may be stock/asset/index/whatever tradeable)
- Fee rates (constant % per each trade)
- Initial capital (I don't think positions will depend on it though)
- bool:short positions available (optional, only long if not)
- Theoretical maximum profit made up of trading 'T'
- Every long and short 'ideal' position (and their closings, of course) made up of such algorithm