Commission: Day by day money cost in intraday strategy
Author: BTGPactualColombia
Creation Date: 7/9/2013 2:54 PM
profile picture

BTGPactualColombia

#1
I am developing an intraday strategy but I need to include the cost of spent money during optimization. The exact problem is knowing how many nights (notice the intraday nature of the strategy) does a position is being held, and then change the P&L accordingly.

Does Wealth-Lab include any feature for this?
If not, could you have a custom commision using C# code?
If not, can we affect the P&L using code?
profile picture

Eugene

#2
To make up a Portfolio Simulation, Wealth-Lab first runs a 1-share Raw Profit backtest of your Strategy on each symbol individually in serial manner. Then to build a portfolio backtest, it applies position sizing using real-world rules against a list of trades compiled during the initial run. By that time, the Strategy's code has already finished executing. Consequently, it does not have the knowledge of money spent because it was executed with 1 share.

One can't affect the P&L from Strategy code but it's possible to create a custom commission plan. For an example, please visit this Wiki page to download sample code: Home - Community.Commissions. Since the precise amount of trading costs is available to performance visualizers, it's reflected on the Performance tab (Total Commission).

The real problem is how to pass the number of nights to the commission structure. The Commission interface doesn't have the knowledge of positions (it works with orders). At the moment, no elegant solution to this problem comes to mind.
profile picture

ichechet

#3
Eugene, I have the same problem when calculate the Forex overnight swaps. The solutions which I have (not an elegant one) is to save the date to file before the order execution in traiding strategy. Then take this date from file in commission. Any other ideas?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).