PureBytes Links
Trading Reference Links
|
Bob Fulks wrote:
> Below is a copy of a previous post containing my Sharpe Ratio
> function. The ELA file is also attached.
Here is my personal modification of the System Equity indicator.
I've made two key changes:
* I added MaxOpenEquity and MaxClosedEquity plots.
* I added a call to Bob's Sharpe Ratio function.
If the StartEq (starting equity) argument is 0, it doesn't compute
the Sharpe ratio. A non-zero starting equity causes it to call Bob's
function and print the Sharpe ratio info to the Print Log. You
should also set the sampling period (see the comments) so you get at
least 25-30 samples, or your results will be unreliable.
The other arguments to Bob's function are set to assume you're
trading futures, and to print out the results from every period.
Gary
=====================================
Inputs: StartEq(0), Period(2);
{
StartEq: Starting Equity for Sharpe calculations.
0 (default) means "don't compute Sharpe ratio."
Period: 0=Yr, 1=Qtr, 2=Mo, 3=Wk, 4=Day
Passes "Use all periods," "Print results every period,"
and "I'm trading futures" arguments to the SharpeRatio function.
}
Vars: MaxOEq(0), MaxCEq(0);
if (I_OpenEquity > MaxOEq) then MaxOEq = I_OpenEquity;
if (I_ClosedEquity > MaxCEq) then MaxCEq = I_ClosedEquity;
Plot1(I_OpenEquity,"OpenEquity");
Plot2(I_ClosedEquity,"ClosedEquity");
Plot3(MaxOEq,"MaxOpEq");
Plot4(MaxCEq,"MaxClEq");
if (StartEq > 0) then
value1 = SharpeRatio(Period, StartEq+I_OpenEquity, 0, 1, TRUE);
Attachment Converted: "c:\eudora\attach\syseq.ela"
|