Regression Analysis

Could someone help me build a simple regression model that measures the estimated price (independent variable) using two dependent variables (TTM EPS and 10-year US Treasury yield)?

I’m struggling to figure this out. (New to coding and P123.)

Off the top of my head should be something like this for AAPL. It does run but have not verified it for correctness

Ticker(“AAPL”)
LinRegXY(“FHist(`close(0 ,##UST10YR)`,CTR)”,“FHist(`NetIncBXorTTM`,CTR)”,52)

This regresses the latest price for TBill with NetIncomeTTM for the past 52 weeks (FHist has weekly offsets)

I’m using NetIncome because we did found a problem with FHist and split sensitive values like EPS. I’m not sure the fix is in yet.

You can also regress the TBill from 6 months ago vs the latest TTM with Close(130,##UST10YR) or FHist(`close(0 ,##UST10YR)`,CTR + 26). TBill is weekays so I think 130 is the right offset.

Again, I did not fully verify. To verify I need to run it for something like 10 iterations, print out the values, and plug in the values in our LinReg sample spreadsheet

NOTE: For the backtick to show up in the forums you need to escape it with `

Thanks, Marco!

Is it possible to do multiple regression at this time? Or just single independent variables?

Single only. The AI factors (close to release) will be the way to do multiple regressions. Trying to do it with our syntax will be so awkward nobody will use them . And how do you use it ? What do you do after you evaluate the regression ? With the AI factor it should all be more intuitive.

The problem with FHist with split sensitive factors has now been resolved