Portfolio signal execution with Real-Time data

Questions about MultiCharts and user contributed studies.
ilag
Posts: 9
Joined: 23 Nov 2017

Portfolio signal execution with Real-Time data

Postby ilag » 26 Sep 2018

Hi,
I am currently working with a portfolio of 100 symbols and 1 signal that contains de PortfolioEntriesPriority keyword.
When backtesting, portfolio trader behaves as expected:
- Signal is executed on each bar on every symbol
- If signal triggers several entries, PortfolioEntriesPriority selects the best ones and if capital is not enough, the rest are discarded.

Some doubts arise when I execute portfolio trader in forward testing with real-time data (assume a 10 minute resolution).

- When is the signal executed? Can I assume that all symbols get the 10 minute bar simultaneously and then the signal is executed?
- If signal is executed every time a symbol gets a 10 minute bar (not simultaneously), it seems that PortfolioEntriesPriority does not have much sense in this scenario. Am I right?

These doubts arise because the results I get with forward testing with 10 minute real-time data along the session are not the same the ones I get backtesting the same 10 minute data at the end of the day (different trades are executed)

Thanks!

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Portfolio signal execution with Real-Time data

Postby Anna MultiCharts » 04 Oct 2018

Hello, ilag!

The priority can be set for the strategies that have already been calculated. In backtesting all bars are already closed and all strategies in Portfolio are calculated simultaneously.
In realtime calculation bars are closed asynchronously. It means the bars are closes not in the order in which symbols are listed in the portfolio, so this prevents strategies from being calculated simultaneously and assigning the priority becomes more complex.
You can set the bar close timeout = 1 sec to force bar closing for all data streams. This should help, though it won’t be a 100% solution.

To change the timeout for the bar closing in the registry for your product version (example given for MultiCharts64):
1. Close MultiCharts and make sure no processes are running in Task Manager -> Details Tab -> Description column -> click on the column name to sort all processes by Description -> no MultiCharts processes should be listed there.
2. Click Windows Start button -> type regedit -> click Enter.
3. Go to the following path for MultiCharts 64-bit: HKEY_CURRENT_USER\Software\TS Support\MultiCharts64\Shaper\CloseBarTimeout
4. Double-click on the CloseBarTimeout and change value to a smaller one. Default is 300 = 5 min.

ilag
Posts: 9
Joined: 23 Nov 2017

Re: Portfolio signal execution with Real-Time data

Postby ilag » 18 Oct 2018

Thanks!


Return to “MultiCharts”