Sanity check on sharpe ratio calculation please

Yes it matters. A strategy earning 10% with 1% costs is a lot safer than one earning 60% with 51% costs because costs are certain and returns aren't.

You MUST know your costs or you can't analyse your returns properly. And we can't help you check to see if your costs are realistic.

GAT

Excellent point.
 
So does one have parameters magically set themselves when the market changes? How is that any different than that same person eyeballing parameters if it's done in a predictable fashion?

.... you can do it purely out of sample if its mechanical

GAT
 
I think I just had an orgasm reading this. Very clear, thank you. Feel like plugging your class? Is it online? I'd attend.

To answer your questions: this isn't a "holy grail", I know it would need tweaking as markets change. The relevant inputs are "100" and "200" and "0" just from intuition looking at recent markets. I've had this idea in my head for the last year, which is why I was able to eyeball it reasonably well for the last period. I have not optimized the parameters at all.

What I would really want to know is: can I take a look at what happens in the awkward periods and make an intuitive, correct decision about what the inputs should be.

There are basically 3 dimensions along which this algorithm works, some are more important than the other. It is very likely due to a change in human factors, that one of these changes during the awkward periods. The market-related inputs, I would be wary of changing. The human-related inputs, I think I would have a very good idea.

Trying it out now...

Just to say you have not optimised and sure not many parameters but if the parameters are based on your market experience you have done what I call tacit fitting. Its extremely likely your backtest results are optimistic.

GAT
 
I agree there is definitely an element of the parameters matching the market, but I am not looking for an auto quant bot. I am looking for something that replicates what I would do manually so I don't have to do it. Modifying parameters (or tacitly fitting) while live trading is part of it.

If my backtest results are optimistic, then you would expect that I should not have the same results out-of-sample right? So pre-2010?
 
Pre-2010 without modifying parameters. Clearly there are periods where it's flat. Also this algorithm is purely "short."

af8UIb5.png


3T6TMzF.png
 
Modifying algorithm to be both long and short basically inverting the same parameters. Was hoping that it would magically fix the flat areas, but didn't. Not a surprise - I think this is a regime change (is that the lingo???)

These are from two separate sources btw, first one only has 2003-2014, second has 2001-2018

G2mPKqK.png


pSTsHSx.png
 
What frequency is the trading? Intraday, daily, weekly?

What prices are you using to enter trades in your backtest? Bid/ask, mid, last trade?

Are you taking into account overnight interest if you are trading FX spot (if you have overnight positions)?

Depending on the answers to these questions, your backtest could be plausible or not realistic at all.
 
Back
Top