How to compute the Sharpe Ratio ?
I have written a small script to generate BUY,HOLD and SELL signals for a given stock in an equity market. I am confused as to how to compute the sharpe ratio. Below are the sample trades which i have simplified here. What is the correct way of computing the sharpe ratio on each day for the below scenario ?
Abbrevations used:
~~~~~~~~~~~~~~~
LTP: Last traded price.
SN: Signal Number
STB: Stocks Quantity To Buy
STS: Stocks Quantity To Sell
Trade History.
Date__________LTP____SN____signal____STB____STS____Sharpe_Ratio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1-Jun-2006____99____1____WAIT________0____0____?
2-Jun-2006____97____2____WAIT________0____0____?
3-Jun-2006____100____3____BUY________10____0____?
4-Jun-2006____100____4____HOLD_______0____0____?
5-Jun-2006____100____5____HOLD_______0____0____?
6-Jun-2006____100____6____HOLD_______0____0____?
7-Jun-2006____100____7____HOLD_______0____0____?
8-Jun-2006____100____8____HOLD_______0____0____?
9-Jun-2006____110____9____BUY________15____0____?
10-Jun-2006____100____10____HOLD_____0____0____?
11-Jun-2006____100____11____HOLD_____0____0____?
12-Jun-2006____100____12____HOLD_____0____0____?
13-Jun-2006____100____13____HOLD_____0____0____?
14-Jun-2006____100____14____HOLD_____0____0____?
15-Jun-2006____100____15____HOLD_____0____0____?
16-Jun-2006____95____16____SELL________0____6____?
17-Jun-2006____100____17____HOLD_____0____0____?
18-Jun-2006____100____18____HOLD_____0____0____?
19-Jun-2006____100____19____HOLD_____0____0____?
20-Jun-2006____90____20____SELL________0____9____?
21-Jun-2006____100____21____HOLD_____0____0____?
22-Jun-2006____100____22____HOLD_____0____0____?
23-Jun-2006____100____23____HOLD_____0____0____?
24-Jun-2006____100____24____HOLD_____0____0____?
25-Jun-2006____100____25____HOLD_____0____0____?
26-Jun-2006____100____26____HOLD_____0____0____?
27-Jun-2006____85____27____SELL________0____10____?
28-Jun-2006____100____28____CLSD_____0____0____?
29-Jun-2006____100____29____CLSD_____0____0____?
30-Jun-2006____100____30____CLSD_____0____0____?
Can someone help please ?
Thanks!
I have written a small script to generate BUY,HOLD and SELL signals for a given stock in an equity market. I am confused as to how to compute the sharpe ratio. Below are the sample trades which i have simplified here. What is the correct way of computing the sharpe ratio on each day for the below scenario ?
Abbrevations used:
~~~~~~~~~~~~~~~
LTP: Last traded price.
SN: Signal Number
STB: Stocks Quantity To Buy
STS: Stocks Quantity To Sell
Trade History.
Date__________LTP____SN____signal____STB____STS____Sharpe_Ratio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1-Jun-2006____99____1____WAIT________0____0____?
2-Jun-2006____97____2____WAIT________0____0____?
3-Jun-2006____100____3____BUY________10____0____?
4-Jun-2006____100____4____HOLD_______0____0____?
5-Jun-2006____100____5____HOLD_______0____0____?
6-Jun-2006____100____6____HOLD_______0____0____?
7-Jun-2006____100____7____HOLD_______0____0____?
8-Jun-2006____100____8____HOLD_______0____0____?
9-Jun-2006____110____9____BUY________15____0____?
10-Jun-2006____100____10____HOLD_____0____0____?
11-Jun-2006____100____11____HOLD_____0____0____?
12-Jun-2006____100____12____HOLD_____0____0____?
13-Jun-2006____100____13____HOLD_____0____0____?
14-Jun-2006____100____14____HOLD_____0____0____?
15-Jun-2006____100____15____HOLD_____0____0____?
16-Jun-2006____95____16____SELL________0____6____?
17-Jun-2006____100____17____HOLD_____0____0____?
18-Jun-2006____100____18____HOLD_____0____0____?
19-Jun-2006____100____19____HOLD_____0____0____?
20-Jun-2006____90____20____SELL________0____9____?
21-Jun-2006____100____21____HOLD_____0____0____?
22-Jun-2006____100____22____HOLD_____0____0____?
23-Jun-2006____100____23____HOLD_____0____0____?
24-Jun-2006____100____24____HOLD_____0____0____?
25-Jun-2006____100____25____HOLD_____0____0____?
26-Jun-2006____100____26____HOLD_____0____0____?
27-Jun-2006____85____27____SELL________0____10____?
28-Jun-2006____100____28____CLSD_____0____0____?
29-Jun-2006____100____29____CLSD_____0____0____?
30-Jun-2006____100____30____CLSD_____0____0____?
Can someone help please ?
Thanks!