Trading rules based on linear regression

Discussion in 'Technical Analysis' started by chvid, Sep 25, 2006.

  1. chvid

    chvid

    Hi.

    I am toying with the idea of a relatively simple adaptive trading rule based on linear regression.

    The idea is to use linear regression to model the earnings in price 50 days ahead based on some variable - for example the earnings in the past 50 days.

    For every possible trade I would estimate the linear model using trading data of the given stock from the past 200 days. So for every possible trade there would be a resample and remodelling. In that way the model could handle that the linear relationship dropped in and out and was different from stock to stock.

    If the linear model says there will be a positive return it will signal buy otherwise sell.

    In essence:

    Let x be the earnings of the past 50 days: log(p(today) / p(today - 50 days))
    Let y be the earnings 50 days ahead: log(p(today + 50 days) / p(today))

    Use the past 200 days of trading in the given stock as sample data to estimate alfa and beta in the linear model:

    y = alfa + beta * x

    Buy the stock if y is positive; otherwise do not.

    Has anyone worked with a similar strategy? What do you think of it?
     
  2. OK...but have to add some more to it

    y = alfa + beta * x (+/- z*S)
    z is Your normal dist value (at alfa=.05 to .00001)
    S is std deviation around the the regression line
    S=(sum of (Fitted Values-actual Values)^2/(N-2))^.5
    N= sample size

    z= 2 to 6
    GL...Hope this works for U
     
  3. teun

    teun

    Why do you take the log of the earnings?

    That someone did that long time ago in order to fit a certain option model doesn't say you also have to do that.
     
  4. Does not make much of difference here in his model

    Options is based evalution on the stock option...Ref: Black-scholtes Model...to compute the elastisty...I would not worry about it!!!
     
  5. jasmine1

    jasmine1

    cute...modern poetry. And the author's gift is coded in numbers. Searching for an edge with lessons to be had from algorithmically
    astute, Wall St. dreamers....

    I love to read these posts...hope you make a fortune
     
  6. I only buy stocks that have prices going up. If they go down I sell them. If they keep going up, I keep them until they start going down.
     
  7. fader

    fader

    are you basically trying to find out if returns over the past x days have predictive value for the next x days?

    most, if not all, studies i have read on the subject say "no", based on statistical analysis.

    my guess is that if there is a predictive relationship, it is a lot more complex than what can be identified by a simple regression analysis.

    all the best.
     
  8. Looks good as far as the model is concerned. The problem I had with this is that earnings are not reported often enough.

    Earnings are essentially reported 4 times per year and then corrected a month or something later.