Tracking strategy performance in Portfolio Trader
Posted: Oct 25 2014
Dear MultiChart team,
let me first mention that I am really thrilled about the things I can do with the MultiCharts Portfolio Trader. It seems there is virtually nothing that can be done with Portfolio Trader - but I am stuck with a problem that seems more effort to solve than it needs to be. Unless I am missing a better way to do this, this is probably a feature request.
Here is what I would like to do:
* add some (maybe 200) instruments to the portfolio strategy
* add some signals (e.g. your readily supplied ones) to the strategy
* create my own money-management signal, which will be basing decisions on the individual instrument strategies
In order for this to work properly, I would need to report the trading performance of the individual instruments to the money-management _prior_ to enabling/ disabling/ resizing orders in the money-manager.
I have tried to set up a 'reporter signal' which reports the performance to the money-manager:
Unfortunately this doesn't work. The moment an instrument gets disabled, I stop seeing orders here - leading to my performance values for that instrument to being flat. I'd say that a strategy should behave exactly the same, regardless of it running in a chart window or in portfolio trader and would therefore tend to consider this behavior a conceptual problem.
What I am looking for is a call like this:
This function would return the current value of the strategy, regardless of any calls to pmms_strategies_deny_entries_all, pmms_strategy_set_entry_contracts or similar. Basically, the return value of this function would be identical to the performance you see when applying a signal to a single instrument in a chart window.
I could then do something like this in my money manager code:
The current workaround requires the instrument strategy go report its performance to the money-manager as outlined in your PortfolioRankSignalBase code. This is not ideal, as a user can no longer freely combine all the existing strategies - but needs to write a new one that reports its performance to the money manager.
There is a similar problem for resizing positions. Your PortfolioRankSignalBase code currently reports the stock price to the money manager using a named num. It would be much cleaner if the money-manager could retrieve some information on potential entry costs for positions and resize based on that.
Looking forward to your feedback and thoughts!
Thank you,
best regards, Felix
let me first mention that I am really thrilled about the things I can do with the MultiCharts Portfolio Trader. It seems there is virtually nothing that can be done with Portfolio Trader - but I am stuck with a problem that seems more effort to solve than it needs to be. Unless I am missing a better way to do this, this is probably a feature request.
Here is what I would like to do:
* add some (maybe 200) instruments to the portfolio strategy
* add some signals (e.g. your readily supplied ones) to the strategy
* create my own money-management signal, which will be basing decisions on the individual instrument strategies
In order for this to work properly, I would need to report the trading performance of the individual instruments to the money-management _prior_ to enabling/ disabling/ resizing orders in the money-manager.
I have tried to set up a 'reporter signal' which reports the performance to the money-manager:
Code: Select all
variable: PortfolioValue(100);
variable: LastPosition(1);
while(LastPosition < MaxPositionsAgo) begin
var: bars_ago(0); bars_ago = MaxPositionsAgo - LastPosition;
var: myEntry (0); myEntry = EntryPrice(bars_ago);
var: myExit (0); myExit = ExitPrice (bars_ago);
PortfolioValue *= myExit / myEntry;
LastPosition += 1;
end;
if GetAppInfo(aiIsPortfolioMode) = 1 then pmm_set_my_named_num("PortfolioReporter-Value", PortfolioValue);
What I am looking for is a call like this:
Code: Select all
pmms_get_strategy_current_value(strategy_index);
I could then do something like this in my money manager code:
Code: Select all
value[strategy_index] = pmms_get_strategy_current_value(strategy_index);
performance[strategy_index] = value[strategy_index][0] / value[strategy_index][60];
There is a similar problem for resizing positions. Your PortfolioRankSignalBase code currently reports the stock price to the money manager using a named num. It would be much cleaner if the money-manager could retrieve some information on potential entry costs for positions and resize based on that.
Looking forward to your feedback and thoughts!
Thank you,
best regards, Felix