[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A question on how to compare buying signals



PureBytes Links

Trading Reference Links



"Bengtsson, Mats" wrote:

> > In the description given in Colby and Meyers' book, the
> > author used a technique he called "variance reduction" to
> > determine significance. I could never decipher what the hell
> > he was talking about though.
>
> I will settle for Sharpe and Kelly. Like them as a good combination.
>
> > This technique can be programmed in EL. You simply program it
> > as a "system" which allows multiple passes thru the data
> > during an optimization.
>
> Could you elaborate on that a little? Are you saying samething like making
> an exit that simulates exiting 3,5,7,10,15 days, delivering statistics for
> the average sharpe for all of those trades when run is done? And at the same
> time getting it to run over the universe of stocks with the output at end? I
> thought that would be close to impossible in Tradestation.
>

Sure. You don't need an "exit" per se... just calculate returns for 3,5,7,... day periods. Do this for each bar. These are the naive returns.

When CurrentBar = 15, start calculating:
    Return = log(C/C[3]);   {this gives the future 3 day log return from the perspective of BarNumber 12}
    SumReturn = SumReturn + Return;

    {gather number for your favorite statistics in here }

You're also checking to see if a system entry is signalled. If so, you 'll have to keep track of that so you can calc the signal returns;
    If EntrySignal[3] is True then
        SignalRetun = Return;
        SumSignalReturn = SumSignalReturn + Return
        {gather stats for the signal returns}


On LastCalcDate, calculate the total returns
    TotalReturn = 10^SumReturn - 1;
    TotalSignalReturn = 10^SumSignalREturn - 1;

    {output data/stats to file using fileappend}

Since you need to use the optimizing abilities in TS, you'll need some bogus entry/exit signals:
    Buy when C < 0;
    Sell when C > 100000;

Add logic to the front of the code to use the optimizer:
    If Input1 = 1 then ReturnLen = 3;
    If input2 = 2 then ReturnLen = 5;
    etc...


You can generate all the returns/stats on one tradable within the capabilities of TS 4. What can't be done w/o some kind of macro or addon, is the optimization thru your universe of tradables.

Bill


>
> This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst & Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.