Hi everyone, i'd like to know if there is a way to build custom fitness in portfolio trader that considers the set of strategies as a single strategy.
I'll explain: i would like to access past positions and those positions would need the date, the time of entry and exit, after i need to process them to build a specific custom fitness.
For a single strategy i have already done it but when i insert it in the trader portfolio and launch the optimizations i think it takes the average of the custom fitness calculated on each strategy and does not calculate it on the set of trades as if they were a single strategy .. does anyone know if there is another way to perform what i need or if i am missing something?
Thank you very much.
Have a nice day.
Barbo
Build custom fitness for Portfolio Trader
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: Build custom fitness for Portfolio Trader
Hi Barbo,i think it takes the average of the custom fitness calculated on each strategy and does not calculate it on the set of trades as if they were a single strategy
Could you reproduce this behaviour in a simplified environment and send us the following files for analysis?
1. The workspace where the behaviour is reproduced.
2. Export of used symbols (with data) from QuoteManager in .qmd archive.
3. The exported scripts with all dependent functions that are used on the workspace.
4. Screenshots and step-by-step instruction how to reproduce the issue, or a short video.
Re: Build custom fitness for Portfolio Trader
Thank you Svetlana, of course i will if necessary, but i think we can solve here: becuase what i'm trying to do is to refer to historical portfolio values to compare them and calculate my own custom fitness. For example.. is it possible to calculate the standard deviation of the portfolio equity curve? To perform that we need to make a calculation for each position, so we need to go back and get the values for each one.
I don't know exactly how customfitness signals works when applied to portfoliotrader.. but my understanding is that for portfolio custom fitness we can use only the portfolio reserved keywords. ( such as portfoliomaxitdrawdown, portfolionetprofit etc.) So if what i'm saying is correct, i'm trying to perform something that can't be calculated, if not i I kindly ask you to explain me..
Thank you.
I don't know exactly how customfitness signals works when applied to portfoliotrader.. but my understanding is that for portfolio custom fitness we can use only the portfolio reserved keywords. ( such as portfoliomaxitdrawdown, portfolionetprofit etc.) So if what i'm saying is correct, i'm trying to perform something that can't be calculated, if not i I kindly ask you to explain me..
Thank you.
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: Build custom fitness for Portfolio Trader
Please refer to this thread.
Pre-built function Portfolio_Equity() can be used to calculate Portfolio Equity Curve:
Please refer to this thread for more info about the standard deviation of the portfolio equity curve calculation.
Pre-built function Portfolio_Equity() can be used to calculate Portfolio Equity Curve:
Code: Select all
var : PE(0);
PE = Portfolio_Equity();