Sharpe Versus Annual Sharpe

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
trender41
Full Member
Full Member
Posts: 22
Joined: Fri Apr 08, 2011 2:19 pm
Location: Washington, DC

Sharpe Versus Annual Sharpe

Post by trender41 » Mon Feb 13, 2012 4:52 pm

can someone please explain the difference? also, why is the annual sharpe sometime lower and sometime higher?

if so, can you do so with #'s, real of fake.

thanks!

mojojojo
Roundtable Knight
Roundtable Knight
Posts: 131
Joined: Mon Oct 31, 2005 2:07 pm

Re: Sharpe Versus Annual Sharpe

Post by mojojojo » Wed Feb 15, 2012 11:47 am

trender41 wrote:can someone please explain the difference? also, why is the annual sharpe sometime lower and sometime higher?

if so, can you do so with #'s, real of fake.

thanks!
Sharpe Ratio is:

(Return - Risk Free Rate) / Standard Deviation of Returns

How you define Return (Annualized, Total Return) and over what time period you use to calculate return and standard deviation will all have an effect on the ratio. Also, how you define the Risk Free rate, will also effect the result.

trender41
Full Member
Full Member
Posts: 22
Joined: Fri Apr 08, 2011 2:19 pm
Location: Washington, DC

Post by trender41 » Wed Feb 15, 2012 12:21 pm

Thanks! in the Standard Output in Blox, I am wondering what the differences are between modified sharpe and annualized sharpe? Obviously if you use less data points in the annualized, you get a different standard deviation, but in the manual it states that the modified also uses annualized data.

just want to understand why they differ and more importantly, why/how they can differ in different directions. . .

thanks!

Eventhorizon
Roundtable Knight
Roundtable Knight
Posts: 229
Joined: Thu Jul 08, 2010 2:36 pm
Location: Boulder, CO
Contact:

Post by Eventhorizon » Thu Feb 16, 2012 1:07 am

trender41,

I am not sure how deep into this I want to get, but there are issues with some of the statistics produced by TB. I have a long-standing project under development: a TB statistics audit block. The idea being every time you upgrade to a new version, you throw this block into your system and it verifies every reported statistic matches a value calculated from first principles to an acceptable level of accuracy. I got bogged down in the returns and in the Sharpes!

Following are some issues with Sharpe ratios and the components used to calculate them:

1) There are no documented definitions of the calculations in the manual so I have struggled to reverse engineer them.
2) Average Annual Returns (test.averageAnnualReturn) and Annual Geometric returns (test.annualGeometricReturn) as reported by TB are the same! This tends to understate arithmetic average annual return.
3) Strangely, standard deviation of annual returns is calculated correctly - if you are ok with partial years counting as full years (so right now in your tests, 2012 counts as a complete year for calculating the sd of annual returns).
4) Daily geometric returns are calculated (I believe) using 1 too few calendar days which leads to a slight over-statement of annual geometric returns. The procedure subtracts the first julian date from the last to get the number of days, I think it should be last - first + 1.
5) Daily arithmetic returns are calculated using trading days, while monthly and annual (item 2 notwithstanding) are / would be calendar periods. It's inconsistent, but I think it is the correct way to go. The partial periods at beginning and end are not pro-rated. I get complete agreement on daily and monthly arithmetic average returns.
6) I get complete agreement on daily, monthly and annual standard deviations of returns.
7) The daily geometric Sharpe and daily Sharpe are reported with the same value! See 2 above.
8) I can only get the reported daily Sharpe to agree with my value to 1 significant figure. Strangely, this is when I use my arithmetic average annual return, not TB's which is geometric.
9) I can only get the monthly to agree to 1 sig fig
10) I can only get the annual to agree to 1 sig fig, using the geometric return, not the arithmetic return (which gives a totally different value).
11) If you gross up the monthly Sharpe by multiplying by sqrt(12), it agrees with the Annualized monthly Sharpe to 2 sig figs.
12) and this one blows my mind .. If I gross up MY monthly Sharpe by multiplying by sqrt(12) it agrees with Modified Sharpe to machine accuracy but is significantly different from the annualized monthly Sharpe.

Bottom line: I cannot make heads or tails of the TB output Sharpe statistics! Maybe it's just me.

rabidric
Roundtable Knight
Roundtable Knight
Posts: 243
Joined: Mon Jan 09, 2006 7:45 am

Post by rabidric » Thu Feb 16, 2012 5:11 am

If the UK/USA are ever in need of a" Thorough-ness Czar", you have my nomination for the job, Event!

sluggo
Roundtable Knight
Roundtable Knight
Posts: 2986
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo » Thu Feb 16, 2012 9:15 am

The great thing about programmable software is, you can program it.

If you want to be sure that statistics S1, S2, S3, ..., S99 are calculated a certain way,
and if you want to be sure they continue to be calculated that way, each time Blox is revised,
you can. It's straightforward.

All you need do is program these statistical calculations yourself, using Blox Builder Edition.
Write the code, subject it to your most stringent verification tests, then drop it into your systems.
Oh, and save it onto a variety of backup media (including paper!), to protect against crashes.

You might as well get used to PRINTing your stats outputs into a file, because that's the only
way to see them when running large simulations with more than 5,000 tests. As the User's
Guide says (section 4.4)
The Detailed Test Report does not print for runs greater than 5000 tests because
the resulting file would be too large for Windows to handle

Jake Carriker
Site Admin
Site Admin
Posts: 1493
Joined: Fri Sep 12, 2003 10:32 am
Location: Austin, Texas

Post by Jake Carriker » Thu Feb 16, 2012 9:44 am

Thank you EventHorizon for your detailed audit of TB output stats. I agree that better documentation is always helpful. I am working with the Blox team here to improve this.

Some of the items you point out on your list might be considered "choices" that the TB developers made that might have been made differently by different people, but are still legitimate choices. Others look less defensible as choices and more like items for upgrade in a future release.

If I was putting something on the chopping block today, here are two stats that I find particularly useless: Annual Sharpe, Daily Sharpe.

Eventhorizon
Roundtable Knight
Roundtable Knight
Posts: 229
Joined: Thu Jul 08, 2010 2:36 pm
Location: Boulder, CO
Contact:

Post by Eventhorizon » Thu Feb 16, 2012 11:49 am

Upon waking this morning, I realized that the most likely source of differences in the Sharpes is going to be in the risk-free rate if the averages and standard deviations agree - doh! These years of zero short-term interest rates are having some effect - on my brain!

Jake,

I would definitely appreciate the stats being documented in more detail, then my auditing block could get finished.

If there was one issue that deserves a closer look it is the arithmetic average annual return vs geometric. I would also like someone to take a second look at the day-count for the geometric return.


Sluggo,

To a large extent I agree with you. However, if the program generates statistics, and they are suitable to your purpose, why duplicate them in Blox Basic? In a large simulation run you could be doing millions of extra calculations absorbing memory and chip cycles. I thought an audit approach might be more efficient!

Post Reply