Portfolio Backtester: Feature request

Questions about MultiCharts and user contributed studies.
User avatar
danilo
Posts: 170
Joined: 02 Jan 2007
Location: Italy
Has thanked: 4 times
Been thanked: 9 times

Portfolio Backtester: Feature request

Postby danilo » 20 Sep 2008

At the moment it's impossible to know which are the best and worst perfomance asset in the portfolio and how the P/L are correlated.

It's possible to add the correlation matrix calculated on equity line of portfolio assets ?

It's possible to add a page that details the performance of each asset inside the portfolio ?



Regards,
Danilo

P.S.
Could be nice to add also a chart windows where all the equity curve are compared.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 25 Sep 2008

Hi danilo,

We are planning to add portfolio analysis breakdown by symbols to our Portfolio Report.

We will also consider adding a page where all the equity curves will be compared.

As for the correlation matrix, we had this idea a while ago, however it was not clear what to base this matrix on. Should it be weeks, months, etc? Do you know where information on the correlation matrix calculations can be found?

Thank you.

User avatar
danilo
Posts: 170
Joined: 02 Jan 2007
Location: Italy
Has thanked: 4 times
Been thanked: 9 times

Postby danilo » 25 Sep 2008

Hi danilo,

We are planning to add portfolio analysis breakdown by symbols to our Portfolio Report.

We will also consider adding a page where all the equity curves will be compared.

As for the correlation matrix, we had this idea a while ago, however it was not clear what to base this matrix on. Should it be weeks, months, etc? Do you know where information on the correlation matrix calculations can be found?

Thank you.
The concept is the following, supposing that you have 2 assets A and B, you apply the strategy S and you are interested to see how the 2 assets are correlated respect to the strategy S, i.e. when the asset A has a profit the asset B has a loss in this case the 2 assets are anti-correlated. To calculate this correlation the steps are the following:

1) Calculate the historical series of Profit/Loss on equity curve:

[equity_A(T)/equity_A(T-k) -1] [equity_B(T)/equity_B(T-k) -1]
[equity_A(T-k)/equity_A(T-2k) -1] [equity_B(T-k)/equity_B(T-2k) -1]

and son on...

k is the resolution, could be 1day, 1week or 1month. I will give the option to decide the resolution to the trader because depend on the resolution of the strategy intraday/daily or long-term.

2) having the 2 historical series PL_A(t) and PL_B(t) to calculate the correlation is enough to use the excel function CORREL(PL_A(t), PL_B(t)).

When the assets are more of 2, for example 4 (A, B, C, D) you need to calculate a symmetrical correlation matrix as:


A B C D

A 1 correl(A,B) correl(A,C) correl(A,D)

B 1 correl(B,C) correl(B,D)

C 1 correl(C,D)

D 1


please, see the attached file.


Regards,
Danilo
Attachments
Correlation Example.zip
Correlation Example
(6.78 KiB) Downloaded 42 times

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 03 Oct 2008

Dear Danilo,

I am answering to this post with a delay (as to most other posts on the forum), but I wanted to thank you from our whole development team for the very valuable information presented in a very clear manner.

We used this information to develop a correlation matrix that will be available in either MC 4. 1 or MC 4. 2.

Thans again!

Regards.


Return to “MultiCharts”