- ago
I'm somewhat new to using MetaStrategies so perhaps this issue may be my own ignorance.
--------------------

I combined a Long only and a Short only strategy into a new MetaStrategy and assigned 50% weight to each. Relevant settings are shown below:

1. Basic settings:


2. Weights assigned:


3. Results:


Question: If the combined Starting Capital is 100k and each strategy is assigned only 50%, shouldn't the Starting Capital for each be 50k? [By extension, if one has 3 strategies in a mix of 50% Long + 30% Long + 20% Short one would expect the Starting Capital to be 80k under Long and 20k under Short.... and so on]
0
150
12 Replies

Reply

Bookmark

Sort
Glitch8
 ( 12.33% )
- ago
#1
The Long Short results show you what would have happened if you traded the strategy but just kept the long or short trades. Everything else including starting capital remains the same.
0
- ago
#2
QUOTE:
kept the long or short trades.

The thing is it's not an "or" but rather an "and" situation. You're trading both strategies simultaneously and have split the capital equally between them and want to see the end result of that situation. Otherwise, you're using 100k + 100k = 200k of capital, or 2x what you had available.
0
Glitch8
 ( 12.33% )
- ago
#3
Let’s agree to disagree on this one?
0
- ago
#4
This is *critical* so I'll try to explain another way using a simple example.

Say you started with 100k of capital and split it equally between 1 Long and 1 Short strategy so each gets 50k of capital. No margin.
The Long strategy had 100% exposure and returned 10% after 10 years, or 5k (10% of 50k).
The Short strategy also had 100% exposure and also returned 10% after 10 years, or 5k (10% of 50k).
Total Return = 5k + 5k = 10k, or 10% of starting capital - which makes perfect sense as each strategy returned 10% on their share of the capital.

But what the backtester is doing is its giving the full amount of the starting capital to both strategies (100k each, for a total of 200k) so it's showing the Long strategy as having returned 10k (10% of 100k) and the Short strategy as also having returned 10k (10% of 100k), for a total of 10k + 10k =20k, or 20% of the initial capital - which is not possible as they only returned 10% on their share of the capital, not on the full capital. (While the percentage returns will, naturally, be the same the total amount will be wrong as its based on an incorrect value of starting capital.)

Bottom line: When there's a mix of Long and Short strategies in a MetaStrategy the Starting Capital needs to be split in the proportion allocated.
(I'm assuming that when there's all Long or all Short strategies in a MetaStrategy their internal allocation is correct.)
0
Glitch8
 ( 12.33% )
- ago
#5
Sammy, the MetaStrategy is enforcing that.

But we can't do what you're asking in the Metrics Report because it just doesn't make sense. Why should the Starting Capital for the Long/Short side for the Metrics report depend on what happened in the MetaStrategy allocations?

What happens if a MetaStrategy component places 1000 long trades and 1 short trade. Then it's starting capital allocation should be shown in the Short Metrics Report? What if it places 1 short trade that doesn't get filled? It's just ridiculous.

You can easily test whether it's enforced in the MetaStrategy like I just did. Create two Strategies, one that just issues a Buy and one that just issues a Short. Give each one 33% percent position size with no margin.

You'll see that when you run the MetaStrategy again and again you'll get 3 long trades and 3 short trades. the starting capital IS SPLIT IN THE METASTRATEGY. But IT DOES NOT MAKE SENSE TO DO WHAT YOU SUGGEST IN THE METRICS REPORT.

You can also verify by looking at the positions. For HD for example, 201 * 82.96 = 16,666 which is 33% of 50,000. NOT 100,000.

Hope you have a nice night.

0
- ago
#6
I slept well, thanks, hope you did, too. :)

I re-ran the Meta with the same 1 Long and 1 Short strategies (Starting Capital 100k split equally between the two) and also ran the strategies individually with 50k starting capital (as allocated in the Meta). Here are the results [Note: slight differences from yesterday's screenshots are due to 1 extra bar (2/28/24) of data]:

a) MetaStrategy results (100k split equally):


b) Individual strategy's results (50k capital):


I would like to make a few points:
1. You're correct that the Profit calculations in the Meta are correct based on the allocations used (allowing for slight differences). I was thrown off by the wrong value of the Starting Capital and didn't do a deep dive into the results (until now).
2. However, since the Starting Capital value is incorrect the metrics under the 'Long Only' and 'Short Only' columns are completely off mark e.g. the Long strategy has a loss of 19k which is shown as -19% though in reality its -38% (of the 50k capital used). So one cannot do a meaningful interpretation of those values.

Suggestions:
- For a MetaStrategy that includes both Long and Short strategies the Starting Capital should ideally be split based on the total amount used by Longs/Shorts separately (an option can be offered on the MetaStrategy Settings tab)
- The metrics under the Long and Short columns should be based off the Starting Capital they used, not the full portfolio (for which there's the Strategy column)
----------------------

Ancillary observations (unrelated):
3. What's going on with Alpha - its positive for the losing Long strategy, negative for the big winning Short strategy, and positive also for the Meta even though its an overall loser?
4. I have commissions set inside the code of the Short strategy (they override default setting of 0); I can see them in the results when its run separately but not in the Meta results. Would be nice if they're included there too since they're coded.
0
Glitch8
 ( 12.33% )
- ago
#7
We’re not going to change the Metrics Report Long/Short starting capital because of the points I made above. Much of the time each Strategy added might have its own long and short trades so it doesn’t make sense to try and reflect that in the Metrics Report. Just run the Strategy by itself if you want to see it’s calculated metrics based on its share of starting capital.
0
Glitch8
 ( 12.33% )
- ago
#8
Thanks for pointing out the Alpha though, I see a flaw in that calculation and got it corrected for B82!

And we'll investigate the commission.
0
- ago
#9
Thanks for fixing Alpha... atleast something good came out of this thread! LOL
0
- ago
#10
Updated to B82 and re-ran the metastrategy:



Alpha values are still as in B81. Perhaps you earmarked fixing this for B83 ?
0
Glitch8
 ( 12.33% )
- ago
#11
Looks like the change didn’t make it through, will investigate.
0
Glitch8
 ( 12.33% )
- ago
#12
Got it ready for B83, tomorrow.
1

Reply

Bookmark

Sort