SPB Git

Repository Public

job_regression.json 49.1 KB 2 lines json

1{"job":{"id":"18633830-7cfb-42a9-9ed4-a9efdef54cfb","tool":"regression","params":{"symbol":"AAPL","regressors":["SPY"],"dependent":"returns","return_type":"log","frequency":"daily","data_period":756,"intercept":true,"lags_dependent":0,"lags_regressors":0,"squared_regressors":false,"rolling_vol":false,"vol_window":21,"volume_change":false,"dow_dummies":false,"month_dummies":false,"estimator":"ols","covariance":"HAC","hac_lags":0,"wls_weights":"inverse_rolling_variance","wls_halflife":126,"prior_mean":0,"prior_scale":1000000,"prior_a":0,"prior_b":0,"confidence":0.95,"rolling_window":126},"status":"done","startedAt":1795217724393,"finishedAt":1795217728671,"error":null,"progress":1,"engineVersion":"1.0.0","durationMs":4278,"projectId":null,"sessionId":null,"cancellable":false,"code":"import numpy as np, pandas as pd, statsmodels.api as sm\n# px: adjusted closes, one column per symbol (AAPL, SPY), sessions common to all, daily bars\npx = pd.read_csv(\"closes.csv\", index_col=0, parse_dates=True).dropna()\nT = np.log(px / px.shift(1))\ny = T[\"AAPL\"]\nX = T[['SPY']].copy()\nX = sm.add_constant(X)\nd = pd.concat([y.rename(\"y\"), X], axis=1).dropna().loc[\"2023-11-11\":]\ny, X = d[\"y\"], d.drop(columns=\"y\")\nres = sm.OLS(y, X).fit(cov_type=\"HAC\", cov_kwds={\"maxlags\": 6, \"use_correction\": True}, use_t=True)\nprint(res.summary())","result":{"success":true,"schema":"lab/1","engine":"regression","engineVersion":"1.0.0","title":"AAPL — OLS regression","headline":"AAPL daily log returns on 1 regressor, OLS, n = 759 (2023-11-13 → 2026-11-20): R² = 0.345; SPY 1.008 (t = 9.10).","summary":[{"label":"Observations","value":759,"unit":"count","kind":"observed"},{"label":"R²","value":0.3447720373064448,"unit":"ratio","kind":"calculated","decimals":4},{"label":"Adjusted R²","value":0.3439064785710504,"unit":"ratio","kind":"calculated","decimals":4},{"label":"β SPY","value":1.0080031016575923,"unit":"ratio","kind":"calculated","decimals":4,"note":"std. error 0.1108"},{"label":"Intercept (annualised)","value":0.044169123334351086,"unit":"percent","kind":"calculated","decimals":2,"note":"per-period intercept × 252; not an alpha unless the regressors are excess returns of traded portfolios"},{"label":"Residual std. deviation","value":0.01366796931685522,"unit":"percent","kind":"calculated","decimals":3}],"tables":[{"id":"coefficients","title":"Coefficients (OLS)","columns":[{"key":"term","label":"Term","type":"text"},{"key":"estimate","label":"Estimate","decimals":6,"type":"number"},{"key":"std_error","label":"Std. error","decimals":6,"type":"number"},{"key":"t","label":"t","decimals":3,"type":"number"},{"key":"p_value","label":"p-value","decimals":4,"type":"number"},{"key":"ci_low","label":"95% CI low","decimals":6,"type":"number"},{"key":"ci_high","label":"95% CI high","decimals":6,"type":"number"}],"rows":[{"term":"const","estimate":0.00017527429894583765,"std_error":0.0005212230308680746,"t":0.3362750465073,"p_value":0.7367566559101281,"ci_low":-0.0008479400379280866,"ci_high":0.001198488635819762},{"term":"SPY","estimate":1.0080031016575923,"std_error":0.11075385731340259,"t":9.101291152372456,"p_value":7.777280328569231e-19,"ci_low":0.7905819058243525,"ci_high":1.2254242974908323}],"note":"Standard errors: Newey-West HAC, Bartlett kernel, 6 lags (automatic: floor(4 (n/100)^(2/9))), small-sample correction n/(n-k). t-tests use the Student distribution with 757 degrees of freedom."},{"id":"fit","title":"Fit statistics","columns":[{"key":"statistic","label":"Statistic","type":"text"},{"key":"value","label":"Value","decimals":5,"type":"number"}],"rows":[{"statistic":"Observations","value":759},{"statistic":"Coefficients","value":2},{"statistic":"Residual degrees of freedom","value":757},{"statistic":"R²","value":0.3447720373064448},{"statistic":"Adjusted R²","value":0.3439064785710504},{"statistic":"F statistic (all slopes = 0, HAC covariance)","value":82.83350064025313},{"statistic":"F p-value","value":7.777280328569231e-19},{"statistic":"Residual std. error","value":0.01366796931685522},{"statistic":"Log-likelihood","value":2182.1864170619347},{"statistic":"AIC","value":-4360.372834123869},{"statistic":"BIC","value":-4351.108830569078}]},{"id":"influence","title":"Most influential observations (Cook's distance)","columns":[{"key":"date","label":"Date","type":"date"},{"key":"actual","label":"Actual","decimals":5,"type":"number"},{"key":"fitted","label":"Fitted","decimals":5,"type":"number"},{"key":"studentized","label":"Studentized residual","decimals":2,"type":"number"},{"key":"leverage","label":"Leverage","decimals":4,"type":"number"},{"key":"cooks_d","label":"Cook's D","decimals":4,"type":"number"},{"key":"dffits","label":"DFFITS","decimals":3,"type":"number"}],"rows":[{"date":"2025-04-09","actual":0.1425712321139166,"fitted":0.1008405083599785,"studentized":3.305709927148432,"leverage":0.1357628831483094,"cooks_d":0.8472060953352653,"dffits":1.3102036683316272},{"date":"2025-04-03","actual":-0.09702516427891272,"fitted":-0.05077405003426588,"studentized":-3.4735721612141526,"leverage":0.03708876960966819,"cooks_d":0.22902154288923268,"dffits":-0.681717452849986},{"date":"2026-11-05","actual":-0.015379369706736723,"fitted":-0.04527896277849333,"studentized":2.226793445124455,"leverage":0.029874652929698584,"cooks_d":0.07595209092244157,"dffits":0.390766605778608},{"date":"2026-07-31","actual":-0.07638203849401949,"fitted":0.007411060245675422,"studentized":-6.290862262607403,"leverage":0.0019015552751797914,"cooks_d":0.035870771132612916,"dffits":-0.27458573037535583},{"date":"2025-04-04","actual":-0.0756377681804654,"fitted":-0.06064101271818324,"studentized":-1.127158295077082,"leverage":0.05207940783591121,"cooks_d":0.03488821545733814,"dffits":-0.2641994756421399},{"date":"2025-05-12","actual":0.06123006696385498,"fitted":0.03293928653705033,"studentized":2.090391128552133,"leverage":0.015182626975720965,"cooks_d":0.03353415669285713,"dffits":0.25955127338313644},{"date":"2025-05-02","actual":-0.03805264413648858,"fitted":0.015038225282468844,"studentized":-3.9291294737624614,"leverage":0.004034750443181682,"cooks_d":0.03068527328912453,"dffits":-0.25008208770312856},{"date":"2025-01-27","actual":0.03126924988322695,"fitted":-0.014178190044290334,"studentized":3.35483993435609,"leverage":0.0043399765385193105,"cooks_d":0.024201712853095612,"dffits":0.22149297670314622},{"date":"2024-11-06","actual":-0.0033021991873800126,"fitted":0.024939882600279854,"studentized":-2.0803592164054914,"leverage":0.009136560272097301,"cooks_d":0.019866005049200778,"dffits":-0.19976655987110156},{"date":"2026-11-20","actual":-0.01922663559835366,"fitted":-0.03720388870569378,"studentized":1.3298173174725956,"leverage":0.020746062568804204,"cooks_d":0.018713443508624476,"dffits":0.19355846204553334}],"note":"Out of 759 observations: 49 with leverage above 2k/n, 13 with |externally studentized residual| above 3, 40 with Cook's D above 4/n. Computed on the reported fit. Thresholds are conventions, not tests."}],"charts":[{"id":"rolling_0","title":"Rolling coefficient: SPY (126-period window)","type":"line","x":{"label":"Window end","type":"time"},"y":{"label":"Coefficient"},"series":[{"name":"SPY","kind":"calculated","x":["2024-05-14","2024-05-20","2024-05-24","2024-05-31","2024-06-06","2024-06-12","2024-06-18","2024-06-25","2024-07-01","2024-07-08","2024-07-12","2024-07-18","2024-07-24","2024-07-30","2024-08-05","2024-08-09","2024-08-15","2024-08-21","2024-08-27","2024-09-03","2024-09-09","2024-09-13","2024-09-19","2024-09-25","2024-10-01","2024-10-07","2024-10-11","2024-10-16","2024-10-22","2024-10-28","2024-11-01","2024-11-07","2024-11-13","2024-11-19","2024-11-25","2024-12-02","2024-12-06","2024-12-12","2024-12-18","2024-12-24","2024-12-31","2025-01-07","2025-01-14","2025-01-21","2025-01-27","2025-01-31","2025-02-06","2025-02-12","2025-02-19","2025-02-25","2025-03-03","2025-03-07","2025-03-13","2025-03-19","2025-03-25","2025-03-31","2025-04-04","2025-04-10","2025-04-16","2025-04-23","2025-04-29","2025-05-05","2025-05-09","2025-05-15","2025-05-21","2025-05-28","2025-06-03","2025-06-09","2025-06-13","2025-06-20","2025-06-26","2025-07-02","2025-07-09","2025-07-15","2025-07-21","2025-07-25","2025-07-31","2025-08-06","2025-08-12","2025-08-18","2025-08-21","2025-08-27","2025-09-03","2025-09-09","2025-09-15","2025-09-19","2025-09-25","2025-10-01","2025-10-07","2025-10-13","2025-10-17","2025-10-23","2025-10-29","2025-11-04","2025-11-10","2025-11-14","2025-11-20","2025-11-26","2025-12-03","2025-12-09","2025-12-15","2025-12-19","2025-12-26","2026-01-02","2026-01-08","2026-01-14","2026-01-21","2026-01-27","2026-02-02","2026-02-06","2026-02-12","2026-02-19","2026-02-25","2026-03-03","2026-03-09","2026-03-13","2026-03-19","2026-03-25","2026-03-31","2026-04-07","2026-04-13","2026-04-17","2026-04-23","2026-04-29","2026-05-05","2026-05-11","2026-05-15","2026-05-21","2026-05-28","2026-06-03","2026-06-09","2026-06-15","2026-06-22","2026-06-25","2026-07-01","2026-07-08","2026-07-14","2026-07-20","2026-07-24","2026-07-30","2026-08-05","2026-08-11","2026-08-17","2026-08-21","2026-08-27","2026-09-02","2026-09-09","2026-09-15","2026-09-21","2026-09-25","2026-10-01","2026-10-07","2026-10-13","2026-10-19","2026-10-23","2026-10-29","2026-11-04","2026-11-10","2026-11-16","2026-11-20"],"y":[1.001698211204978,1.0103681642986138,1.0388156259503767,1.0023049433729745,0.9981927050982999,1.022645038800078,1.0264948114957735,1.0750024569268237,1.095862783734451,1.0726363045740839,1.0965875186882257,1.1360656601888588,1.0842166292757847,1.076306331897043,1.0923747047824839,1.0471230707379902,1.0553404554474963,1.0463474900006011,1.067378504276251,1.0817998463231162,1.0538651699182606,1.0502196195718125,1.0679387019166282,1.0778894040853406,1.092901913164082,1.1232794623394984,1.1402017591400655,1.0973320442866492,1.1073735725124638,1.1402935165377592,1.0566853810255872,0.9988416405475942,0.9976475983084749,0.9864565400042205,0.9634648115745924,0.9881944528952044,0.9916482628088489,0.9344610518975272,0.8977567244502375,0.9032532634798406,0.8989223440208335,0.8840415512438298,0.8683371673433002,0.8296935463510435,0.7514679045895277,0.7722363963709776,0.7682067363858044,0.7914496908387205,0.7938556724156621,0.7613079727403214,0.7771115641169496,0.7286156363096202,0.8882556020276934,0.8937275932275757,0.8587836434490056,0.882654648625593,1.105426338046575,1.224447196115545,1.2472750479131274,1.2501774417436236,1.241296085322173,1.2164967031233151,1.2207411321651402,1.266561763689955,1.2716357096322246,1.2747321254595652,1.2721416935408927,1.273408912527302,1.2789292560875498,1.281696515547917,1.2892409358232024,1.2946598263953804,1.3006186211954809,1.2991417691196963,1.2967580399920147,1.3082656672235629,1.3296872533794117,1.3267365406837222,1.3312029384581718,1.3333795696279842,1.3352516033946782,1.3494474036248463,1.3685414088854384,1.3735528135309487,1.368049452796699,1.3753658274086995,1.3862149464577258,1.3848568589231776,1.3340397962357617,1.2070449139593962,1.1660685439200786,1.2364182048877808,1.2584938258839546,1.2817558673100615,1.128165444501695,1.0969839667102996,1.0587489504011494,1.0238271561810415,1.0035796894819042,0.9911622701899776,0.9557217113414637,0.9557245560489768,0.9892124397296759,0.9717026012750972,0.9178720971564401,0.9153752949103806,0.9669435959693041,0.9989068194611754,0.9733440116378057,0.8790153746443787,0.9175827364711718,0.9262513243167759,0.9184547109265642,0.934466616577773,0.9015371144056109,0.9436072021455274,0.9534132701036179,0.9011400295090387,0.8974872775936583,0.9007224139334031,0.8830078812698203,0.8729905033663626,0.8594769231748466,0.8068346818048682,0.8542999966552776,0.8959671698793663,0.8778081302946875,0.895003647904018,0.8850171910568078,0.9120847663587793,0.89058697087045,0.8523016597791903,0.8505538467699013,0.8545710069831624,0.8025869417077713,0.8078853920562796,0.8060236074775222,0.8034392109333215,0.7717964091293266,0.7066400165653396,0.6197647380944799,0.6602067734706082,0.5894912595035628,0.5753066841021122,0.5700680893298764,0.5314190319644105,0.540613473376698,0.4814616318076482,0.46538220937041175,0.48781720137257856,0.4245105935411652,0.3832363340372815,0.3851495597244563,0.3106294023411633,0.2483300409789687,0.23632942879929789,0.3136791769961332,0.34967293552409723,0.38474500820401514,0.40058985996280533],"lower":[0.6980941548906178,0.696556576532491,0.7237499859884354,0.6945836150182898,0.6931655686413721,0.7122776929975667,0.7074822156052408,0.73804880259226,0.7578631532453577,0.7403611170122928,0.7595708746220249,0.8063643989047187,0.7802475746827217,0.7747864438122516,0.7730136782995123,0.7412295915601173,0.7586411304776238,0.7482314133046873,0.7655172994990637,0.7946584842792825,0.7715007878904043,0.7719186411438859,0.7868922896740314,0.7975534430523937,0.8099101001592812,0.8387637657060939,0.865462719313722,0.814201903017878,0.8155248649573104,0.8522215684033695,0.7894291776950265,0.7070812040242263,0.7033646145788104,0.6975013239423771,0.6712884635843227,0.6940210610918798,0.694671079372551,0.6405140714912816,0.6267893821105102,0.6379685636975585,0.6420000045163381,0.6345528573624333,0.6217287580512139,0.5793121774670866,0.4604783767691412,0.47275047978988766,0.480414574512078,0.4881903518560445,0.4741101084780227,0.4481205490311277,0.48786372667242656,0.445604864257049,0.5678070275556284,0.5894661031486221,0.5647733789865353,0.6027277811613067,0.7972114639570447,1.0017634914274014,1.03970159427332,1.0530574921363574,1.0427964329375992,1.0007353950852373,1.0044991568551642,1.0752728199845636,1.0818101297533211,1.0881296356050918,1.0841884174527217,1.085473260580785,1.0926718871026293,1.0975345900298803,1.103681377036638,1.1107298816154056,1.1188874139230593,1.1144467409825916,1.1112260190040573,1.1286502017831008,1.1605204898850972,1.1590854890131865,1.1658007260286087,1.1672483389662442,1.1695851802250383,1.188810898983379,1.2084109889597816,1.2120107019567468,1.2042446364702486,1.2120126981133905,1.2232929041084712,1.2181726803796908,1.1551527337904637,0.9187768570107155,0.8644556887393524,0.8660358679673121,0.8965927674256303,0.9869405654585779,0.8552734637501609,0.8167331299433669,0.7805743883349914,0.7474418568020087,0.724628016683314,0.7062562755021511,0.6647968112262482,0.6719303511756154,0.7059749188354698,0.6878938355914834,0.6270429219821282,0.6259377239636801,0.6818046283860455,0.7133024891515235,0.6756439811788768,0.5939072086994402,0.593640044301017,0.6020073803371884,0.5869070460190823,0.6064636861900227,0.5834427275421518,0.6364461297324283,0.6595095290954323,0.6193005488911848,0.6504687715665651,0.6551469620079833,0.6514030228359651,0.6240157744777611,0.6143781163221997,0.5570681193343775,0.6061401580125817,0.6486727046325846,0.6279240930700829,0.6396472174919858,0.615538828296512,0.6419324367119481,0.6339785248170875,0.608173767594392,0.607319731077048,0.6149266544621224,0.5535254758914656,0.559352317527118,0.5598090433661805,0.557563287509541,0.5326966879326331,0.46401625599027807,0.35682691443646664,0.3874178557520012,0.3477943534298791,0.3316983310067193,0.32351337897263177,0.2808353369496313,0.2863701067170788,0.21869585522462115,0.2023158753124482,0.21596826401809888,0.12918858927922267,0.07189486025910952,0.06549978927971417,-0.00036297518267203177,-0.05978331008608079,-0.0742053729536,-0.03557201811534011,0.08010502735103181,0.12331013863663509,0.16631616229740145],"upper":[1.305302267519338,1.3241797520647365,1.3538812659123178,1.3100262717276592,1.3032198415552276,1.3330123846025894,1.345507407386306,1.4119561112613874,1.4338624142235443,1.404911492135875,1.4336041627544265,1.465766921472999,1.3881856838688478,1.3778262199818343,1.4117357312654555,1.353016549915863,1.352039780417369,1.3444635666965148,1.369239709053438,1.3689412083669499,1.336229551946117,1.3285205979997392,1.348985114159225,1.3582253651182876,1.3758937261688828,1.407795158972903,1.4149407989664091,1.3804621855554204,1.3992222800676173,1.428365464672149,1.323941584356148,1.290602077070962,1.2919305820381395,1.2754117560660638,1.255641159564862,1.282367844698529,1.2886254462451467,1.2284080323037727,1.1687240667899648,1.1685379632621227,1.1558446835253289,1.1335302451252263,1.1149455766353866,1.0800749152350004,1.0424574324099143,1.0717223129520677,1.0559988982595307,1.0947090298213966,1.1136012363533014,1.074495396449515,1.0663594015614726,1.0116264083621915,1.2087041764997584,1.1979890833065292,1.1527939079114757,1.1625815160898791,1.4136412121361053,1.4471309008036886,1.4548485015529347,1.4472973913508898,1.439795737706747,1.432258011161393,1.4369831074751163,1.4578507073953466,1.461461289511128,1.4613346153140385,1.4600949696290637,1.461344564473819,1.4651866250724703,1.4658584410659536,1.4748004946097668,1.478589771175355,1.4823498284679024,1.483836797256801,1.482290060979972,1.4878811326640249,1.4988540168737263,1.4943875923542578,1.496605150887735,1.4995108002897242,1.500918026564318,1.5100839082663136,1.5286718288110952,1.5350949251051507,1.5318542691231496,1.5387189567040085,1.5491369888069804,1.5515410374666643,1.5129268586810598,1.4953129709080768,1.4676813991008049,1.6068005418082494,1.620394884342279,1.5765711691615452,1.4010574252532293,1.3772348034772324,1.3369235124673073,1.3002124555600743,1.2825313622804946,1.2760682648778041,1.2466466114566792,1.2395187609223381,1.272449960623882,1.255511366958711,1.2087012723307522,1.2048128658570811,1.2520825635525628,1.2845111497708275,1.2710440420967346,1.1641235405893173,1.2415254286413266,1.2504952682963635,1.250002375834046,1.2624695469655234,1.21963150126907,1.2507682745586264,1.2473170111118035,1.1829795101268927,1.1445057836207515,1.146297865858823,1.1146127397036756,1.1219652322549643,1.1045757300274934,1.056601244275359,1.1024598352979735,1.143261635126148,1.1276921675192921,1.1503600783160501,1.1544955538171036,1.1822370960056106,1.1471954169238125,1.0964295519639886,1.0937879624627547,1.0942153595042023,1.051648407524077,1.0564184665854413,1.052238171588864,1.0493151343571019,1.01089613032602,0.9492637771404011,0.8827025617524931,0.9329956911892152,0.8311881655772466,0.818915037197505,0.816622799687121,0.7820027269791898,0.7948568400363172,0.7442274083906752,0.7284485434283753,0.7596661387270582,0.7198325978031077,0.6945778078154535,0.7047993301691984,0.6216217798649987,0.5564433920440182,0.5468642305521958,0.6629303721076065,0.6192408436971626,0.6461798777713952,0.6348635576282092],"style":"band","line":true},{"name":"Full sample","kind":"calculated","x":["2024-05-14","2026-11-20"],"y":[1.0080031016575923,1.0080031016575923],"style":"dashed"}],"note":"OLS on the trailing 126 periods ending at each date; band = ±1.96 HC0 standard errors, pointwise. Overlapping windows make consecutive estimates highly correlated."},{"id":"fitted","title":"Fitted vs actual","type":"line","x":{"label":"Date","type":"time"},"y":{"label":"AAPL (log returns)","unit":"percent"},"series":[{"name":"Actual","kind":"observed","x":["2023-11-13","2023-11-20","2023-11-28","2023-12-04","2023-12-11","2023-12-18","2023-12-26","2024-01-02","2024-01-09","2024-01-17","2024-01-24","2024-01-30","2024-02-06","2024-02-13","2024-02-21","2024-02-28","2024-03-05","2024-03-12","2024-03-19","2024-03-26","2024-04-02","2024-04-09","2024-04-16","2024-04-23","2024-04-29","2024-05-06","2024-05-13","2024-05-20","2024-05-24","2024-06-03","2024-06-10","2024-06-17","2024-06-25","2024-07-01","2024-07-09","2024-07-16","2024-07-23","2024-07-29","2024-08-05","2024-08-12","2024-08-19","2024-08-23","2024-08-30","2024-09-09","2024-09-16","2024-09-23","2024-09-27","2024-10-04","2024-10-11","2024-10-18","2024-10-24","2024-10-31","2024-11-07","2024-11-14","2024-11-20","2024-11-27","2024-12-05","2024-12-12","2024-12-19","2024-12-26","2025-01-03","2025-01-13","2025-01-21","2025-01-27","2025-02-03","2025-02-10","2025-02-18","2025-02-24","2025-03-03","2025-03-10","2025-03-17","2025-03-21","2025-03-28","2025-04-04","2025-04-11","2025-04-21","2025-04-25","2025-05-02","2025-05-09","2025-05-16","2025-05-22","2025-05-30","2025-06-06","2025-06-13","2025-06-20","2025-06-27","2025-07-07","2025-07-14","2025-07-21","2025-07-25","2025-08-01","2025-08-08","2025-08-15","2025-08-21","2025-08-28","2025-09-05","2025-09-12","2025-09-18","2025-09-25","2025-10-02","2025-10-09","2025-10-15","2025-10-22","2025-10-29","2025-11-05","2025-11-12","2025-11-18","2025-11-25","2025-12-03","2025-12-10","2025-12-16","2025-12-23","2025-12-31","2026-01-08","2026-01-14","2026-01-22","2026-01-29","2026-02-05","2026-02-12","2026-02-19","2026-02-26","2026-03-05","2026-03-12","2026-03-18","2026-03-25","2026-04-01","2026-04-09","2026-04-15","2026-04-22","2026-04-29","2026-05-06","2026-05-13","2026-05-19","2026-05-27","2026-06-03","2026-06-10","2026-06-16","2026-06-24","2026-07-01","2026-07-09","2026-07-15","2026-07-22","2026-07-29","2026-08-05","2026-08-11","2026-08-18","2026-08-25","2026-09-01","2026-09-09","2026-09-15","2026-09-22","2026-09-29","2026-10-06","2026-10-12","2026-10-19","2026-10-26","2026-11-02","2026-11-06","2026-11-13","2026-11-20"],"y":[-0.008623095510715568,0.009248989548899446,0.0031972743852078118,-0.00947319484632329,-0.013023730656865008,-0.008547500677559933,-0.002829449097511932,-0.03648651582567906,-0.0022953338310169854,-0.005198839207935501,-0.00348332775719495,-0.019471955008944893,0.00859850525523177,-0.011307540975463387,0.004170263765706224,-0.00661389099846759,-0.028838008228043097,0.00274862011111843,0.013477370901088142,-0.0067136276882739775,-0.007045646533163652,0.007180929666511028,-0.019342276331942927,0.006324131749468081,0.02449583894865907,-0.009144631021265094,0.017507833129306524,0.006153539124618863,0.016461056389472126,0.00920653047799847,-0.019325524379110403,0.019493060370373832,0.00445564472125712,0.02870105517493756,0.00376231493923446,0.001808630240676998,0.004680476591331772,0.0012970170430450251,-0.049355529362133305,0.007076379622192044,-0.0006698671680653385,0.0102395314380341,-0.0034312896590423586,0.0004112123969945688,-0.028195497757919016,-0.0076349802703788335,0.0011968351791011632,0.004995772913103919,-0.006542038095958075,0.01218368134366667,-0.0008312370597840018,-0.018367818165783617,0.021161015551241703,0.013652848096644618,0.0031743259173819534,-0.0005576407651207099,0.0001244322778932926,0.005952883925132835,0.006965282877762842,0.0031572203731855906,-0.002027600884996098,-0.01043859745898415,-0.03242901422803412,0.03126924988322695,-0.03441424074100009,0.0011949283358488457,-0.0005352988536543367,0.006295242144692267,-0.015863356700594102,-0.0496918888842739,0.002402545025648065,0.019283317588222194,-0.02694425724157369,-0.0756377681804654,0.03980831397981664,-0.01961555692497404,0.004339656745484935,-0.03805264413648858,0.005288596104756694,-0.0009040086258570518,-0.003638996064767065,0.004465973250608539,0.016306600449602592,-0.013877462512195083,0.022207959253976062,0.0004001600693654691,-0.017001881735318424,-0.01207373808311312,0.006171393904542445,0.000564360641419566,-0.025316565747493393,0.04144882603549847,-0.0051480721947526125,-0.004945322056530347,0.008937152761222629,-0.0003770818102710562,0.017401529919161222,-0.0046761538605272065,0.01791257552087521,0.006545064614056041,-0.015731058174729688,0.0063043247798867455,-0.01657390029534521,0.0025731400895389177,0.00037189929395881576,-0.006473934938977669,-7.504127273512171e-05,0.00381146440327069,-0.007178579634152293,0.0057397771428103804,0.0018287558587755503,0.0050975287686565954,-0.004456318948259485,-0.004984843291651994,-0.004160252533484714,0.0028324045803190486,0.007135506851230089,-0.0021072526327016185,-0.051254989750769635,-0.014362355360262022,-0.004653812976180871,-0.008514280168684062,-0.019563563043256394,-0.016982253060286646,0.003896780150699746,0.007202912294058016,0.006138185929479134,0.028937734560754456,0.025988041725147976,-0.001816328921179598,0.011644351548133864,0.01373374490720194,0.003792905444973507,0.008153010317434482,-0.01579022318238788,0.0035444556112051275,0.009483844414477761,-0.004126670590289344,0.017193580605067933,0.009004340256456403,0.03936140874025995,-0.005669905009792007,-0.005582069222257865,0.005231049417552503,-0.010935135323064627,0.01440324013521311,-0.001419904717712418,0.02578515083297715,-0.0027888716814740357,-0.0052416073737592194,0.002270684097384914,-0.026946436994934715,0.0022221564052392648,0.012790202272377819,-0.0015163005179639638,-0.011054632775251282,-0.018493266223483386,-0.005247672460593119,0.003909166195924788,-0.01922663559835366]},{"name":"Fitted","kind":"calculated","x":["2023-11-13","2023-11-20","2023-11-28","2023-12-04","2023-12-11","2023-12-18","2023-12-26","2024-01-02","2024-01-09","2024-01-17","2024-01-24","2024-01-30","2024-02-06","2024-02-13","2024-02-21","2024-02-28","2024-03-05","2024-03-12","2024-03-19","2024-03-26","2024-04-02","2024-04-09","2024-04-16","2024-04-23","2024-04-29","2024-05-06","2024-05-13","2024-05-20","2024-05-24","2024-06-03","2024-06-10","2024-06-17","2024-06-25","2024-07-01","2024-07-09","2024-07-16","2024-07-23","2024-07-29","2024-08-05","2024-08-12","2024-08-19","2024-08-23","2024-08-30","2024-09-09","2024-09-16","2024-09-23","2024-09-27","2024-10-04","2024-10-11","2024-10-18","2024-10-24","2024-10-31","2024-11-07","2024-11-14","2024-11-20","2024-11-27","2024-12-05","2024-12-12","2024-12-19","2024-12-26","2025-01-03","2025-01-13","2025-01-21","2025-01-27","2025-02-03","2025-02-10","2025-02-18","2025-02-24","2025-03-03","2025-03-10","2025-03-17","2025-03-21","2025-03-28","2025-04-04","2025-04-11","2025-04-21","2025-04-25","2025-05-02","2025-05-09","2025-05-16","2025-05-22","2025-05-30","2025-06-06","2025-06-13","2025-06-20","2025-06-27","2025-07-07","2025-07-14","2025-07-21","2025-07-25","2025-08-01","2025-08-08","2025-08-15","2025-08-21","2025-08-28","2025-09-05","2025-09-12","2025-09-18","2025-09-25","2025-10-02","2025-10-09","2025-10-15","2025-10-22","2025-10-29","2025-11-05","2025-11-12","2025-11-18","2025-11-25","2025-12-03","2025-12-10","2025-12-16","2025-12-23","2025-12-31","2026-01-08","2026-01-14","2026-01-22","2026-01-29","2026-02-05","2026-02-12","2026-02-19","2026-02-26","2026-03-05","2026-03-12","2026-03-18","2026-03-25","2026-04-01","2026-04-09","2026-04-15","2026-04-22","2026-04-29","2026-05-06","2026-05-13","2026-05-19","2026-05-27","2026-06-03","2026-06-10","2026-06-16","2026-06-24","2026-07-01","2026-07-09","2026-07-15","2026-07-22","2026-07-29","2026-08-05","2026-08-11","2026-08-18","2026-08-25","2026-09-01","2026-09-09","2026-09-15","2026-09-22","2026-09-29","2026-10-06","2026-10-12","2026-10-19","2026-10-26","2026-11-02","2026-11-06","2026-11-13","2026-11-20"],"y":[-0.0007977819227814168,0.007889739246585847,0.0011636817294052627,-0.005120406350240939,0.004096808790376873,0.005815426175489897,0.0044300314204695915,-0.005491134213177201,-0.001361282630982115,-0.005451621996657436,0.0012911054141921253,-0.0006090567241146677,0.0031087387648256874,-0.013801744557063084,0.0010759597489884223,-0.001160387285502194,-0.009954058663307234,0.01094922767504487,0.005764824072774546,-0.0016832753498753458,-0.006244768344803578,0.0013549620767398596,-0.0016573280840938298,0.012066574604017078,0.00374213191545019,0.010514065390448631,0.0003147392840301842,0.001331050333332657,0.006822293885789965,0.0009817476355804392,0.0032992433316212043,0.008173678334816662,0.004055945508419557,0.0022449601264368587,0.0011621344675053894,0.006144643481921914,-0.0014112359884915137,0.0007641000060971787,-0.029610772539645825,0.0006991592347477219,0.00975892581051029,0.010830914764398538,0.009763434922755401,0.011407153115659154,0.0016650566400727004,0.0026947622479405503,-0.0012854040054789925,0.00930571771861504,0.006189598511754731,0.004046061869309747,0.002367535535684008,-0.01977481168532609,0.007944759106350122,-0.006321455386150521,0.0005071559279282869,-0.0028855358334092173,-0.0014892747255944728,-0.0050330880554880384,-0.00014139799892942502,0.00024364593986307427,0.01270242205050767,0.0017322274272957388,0.00936958784424387,-0.014178190044290334,-0.006627883513020116,0.006995579094491768,0.0031211034504890493,-0.004426625100618405,-0.01764278729440291,-0.027030106931343716,0.007925264130529202,0.0005023887271476129,-0.020325210147349226,-0.06064101271818324,0.018007935084979523,-0.024117506420776525,0.007422020416344539,0.015038225282468844,-0.0011131406605294992,0.0065418129507361375,0.0005619874998954327,-0.0009542189384800255,0.010472775112421808,-0.011141228976769554,-0.002194518918980546,0.0051723254887744725,-0.007368589542027466,0.002106691588929438,0.002078256943770735,0.0044179478269898735,-0.016481464070504635,0.007998525120645797,-0.0021720552024607513,-0.003883793310991407,0.0037399131295013325,-0.0027566189438203137,-0.00015104338994752418,0.004876256093928107,-0.004474501136554921,0.0013482833226740622,-0.0027352713057238872,0.004642638737312015,-0.005074872613286629,0.0006497124328594515,0.003669953665091078,0.0007270858599768828,-0.008324905156792075,0.009607979838775753,0.0036675673020664617,0.006836046485696542,-0.0025825608370200455,0.004763370985102069,-0.007319979534960969,7.214548745553756e-05,-0.00480093414078992,0.005423338908115728,-0.001828054567020891,-0.012502865378502964,-0.015523191208675013,-0.0024778935506849713,-0.0054389644705216235,-0.005460154487693284,-0.015248124129116717,-0.013977935465868459,0.0057745325515903695,0.007733451197356704,0.005973392747074636,0.008109372658170064,0.010340290095304487,1.867360067760676e-05,0.01409068260174866,0.005800359667011359,-0.0065679829241852795,-2.1018155453163906e-07,-0.0069188438423313835,-0.015841165825431703,-0.005855692562743215,-0.00029318626056442835,-0.0011923543609418114,0.008679971248309187,0.004159242878640258,-0.000986782516070657,-0.015453633180388969,-0.0018442733440825452,-0.003045603941655396,-0.006648440009116986,0.0033864248813768693,-0.006778139827685042,-0.004519055877200199,-0.004470369574934243,1.888159564430398e-05,-0.001682845043714485,0.005702076155705912,-0.000433411513943356,0.00443204491461615,0.007312357820027457,-0.004664797113849633,0.0033195155243757137,-0.0034926448909963115,-0.03720388870569378]}],"note":"In-sample fitted values."},{"id":"residuals","title":"Residuals","type":"line","x":{"label":"Date","type":"time"},"y":{"label":"Residual","unit":"percent"},"series":[{"name":"Residual","kind":"calculated","x":["2023-11-13","2023-11-20","2023-11-28","2023-12-04","2023-12-11","2023-12-18","2023-12-26","2024-01-02","2024-01-09","2024-01-17","2024-01-24","2024-01-30","2024-02-06","2024-02-13","2024-02-21","2024-02-28","2024-03-05","2024-03-12","2024-03-19","2024-03-26","2024-04-02","2024-04-09","2024-04-16","2024-04-23","2024-04-29","2024-05-06","2024-05-13","2024-05-20","2024-05-24","2024-06-03","2024-06-10","2024-06-17","2024-06-25","2024-07-01","2024-07-09","2024-07-16","2024-07-23","2024-07-29","2024-08-05","2024-08-12","2024-08-19","2024-08-23","2024-08-30","2024-09-09","2024-09-16","2024-09-23","2024-09-27","2024-10-04","2024-10-11","2024-10-18","2024-10-24","2024-10-31","2024-11-07","2024-11-14","2024-11-20","2024-11-27","2024-12-05","2024-12-12","2024-12-19","2024-12-26","2025-01-03","2025-01-13","2025-01-21","2025-01-27","2025-02-03","2025-02-10","2025-02-18","2025-02-24","2025-03-03","2025-03-10","2025-03-17","2025-03-21","2025-03-28","2025-04-04","2025-04-11","2025-04-21","2025-04-25","2025-05-02","2025-05-09","2025-05-16","2025-05-22","2025-05-30","2025-06-06","2025-06-13","2025-06-20","2025-06-27","2025-07-07","2025-07-14","2025-07-21","2025-07-25","2025-08-01","2025-08-08","2025-08-15","2025-08-21","2025-08-28","2025-09-05","2025-09-12","2025-09-18","2025-09-25","2025-10-02","2025-10-09","2025-10-15","2025-10-22","2025-10-29","2025-11-05","2025-11-12","2025-11-18","2025-11-25","2025-12-03","2025-12-10","2025-12-16","2025-12-23","2025-12-31","2026-01-08","2026-01-14","2026-01-22","2026-01-29","2026-02-05","2026-02-12","2026-02-19","2026-02-26","2026-03-05","2026-03-12","2026-03-18","2026-03-25","2026-04-01","2026-04-09","2026-04-15","2026-04-22","2026-04-29","2026-05-06","2026-05-13","2026-05-19","2026-05-27","2026-06-03","2026-06-10","2026-06-16","2026-06-24","2026-07-01","2026-07-09","2026-07-15","2026-07-22","2026-07-29","2026-08-05","2026-08-11","2026-08-18","2026-08-25","2026-09-01","2026-09-09","2026-09-15","2026-09-22","2026-09-29","2026-10-06","2026-10-12","2026-10-19","2026-10-26","2026-11-02","2026-11-06","2026-11-13","2026-11-20"],"y":[-0.007825313587934151,0.0013592503023135988,0.0020335926558025493,-0.004352788496082351,-0.01712053944724188,-0.01436292685304983,-0.007259480517981524,-0.030995381612501857,-0.0009340512000348704,0.000252782788721935,-0.004774433171387075,-0.018862898284830225,0.005489766490406084,0.0024942035815996976,0.0030943040167178016,-0.005453503712965395,-0.018883949564735863,-0.008200607563926439,0.007712546828313596,-0.005030352338398632,-0.0008008781883600737,0.005825967589771168,-0.017684948247849098,-0.005742442854548997,0.02075370703320888,-0.019658696411713725,0.01719309384527634,0.0048224887912862065,0.00963876250368216,0.008224782842418031,-0.022624767710731606,0.01131938203555717,0.00039969921283756257,0.026456095048500702,0.0026001804717290704,-0.004336013241244916,0.006091712579823286,0.0005329170369478464,-0.01974475682248748,0.006377220387444323,-0.01042879297857563,-0.0005913833263644381,-0.01319472458179776,-0.010995940718664585,-0.029860554397991717,-0.010329742518319383,0.0024822391845801556,-0.004309944805511122,-0.012731636607712805,0.008137619474356924,-0.00319877259546801,0.0014069935195424738,0.013216256444891581,0.01997430348279514,0.0026671699894536666,0.0023278950682885076,0.0016137070034877654,0.010985971980620873,0.007106680876692267,0.0029135744333225163,-0.014730022935503769,-0.012170824886279888,-0.041798602072277986,0.045447439927517284,-0.027786357227979976,-0.005800650758642922,-0.0036564023041433863,0.010721867245310672,0.0017794305938088062,-0.022661781952930185,-0.0055227191048811365,0.018780928861074582,-0.0066190470942244645,-0.014996755462282158,0.02180037889483712,0.004501949495802484,-0.0030823636708596043,-0.05309086941895742,0.006401736765286194,-0.007445821576593189,-0.0042009835646624975,0.005420192189088564,0.005833825337180784,-0.0027362335354255297,0.02440247817295661,-0.004772165419409003,-0.009633292193290958,-0.014180429672042558,0.00409313696077171,-0.0038535871855703077,-0.008835101676988758,0.033450300914852675,-0.0029760169922918613,-0.0010615287455389396,0.005197239631721296,0.0023795371335492577,0.017552573309108747,-0.009552409954455315,0.02238707665743013,0.005196781291381979,-0.0129957868690058,0.00166168604257473,-0.01149902768205858,0.0019234276566794661,-0.003298054371132262,-0.007201020798954552,0.008249863884056952,-0.005796515435505063,-0.010846146936218755,-0.0010962693428861617,0.004411316695795596,0.0003341577835545267,0.002863660586701484,-0.005056988779107532,0.0006406816073052067,-0.0025909343277966796,0.008963561418250979,0.010395612745801345,-0.03573179854209462,-0.01188446180957705,0.0007851514943407528,-0.003054125680990778,-0.004315438914139677,-0.0030043175944181877,-0.0018777524008906235,-0.0005305389032986873,0.0001647931824044985,0.020828361902584393,0.01564775162984349,-0.0018350025218572047,-0.002446331053614796,0.00793338524019058,0.010360888369158786,0.008153220498989014,-0.008871379340056499,0.01938562143663683,0.015339536977220975,-0.0038334843297249156,0.018385934966009744,0.00032436900814721524,0.03520216586161969,-0.00468312249372135,0.009871563958131104,0.007075322761635048,-0.007889531381409232,0.021051680144330096,-0.0048063295990892875,0.03256329066066219,0.0017301841957261632,-0.0007712377988249768,0.0022518025017406102,-0.02526359195122023,-0.0034799197504666473,0.013223613786321175,-0.005948345432580113,-0.01836699059527874,-0.013828469109633753,-0.008567187984968833,0.0074018110869211,0.017977253107340118]},{"name":"+2 s.d.","kind":"calculated","x":["2023-11-13","2026-11-20"],"y":[0.02733593863371044,0.02733593863371044],"style":"dashed"},{"name":"-2 s.d.","kind":"calculated","x":["2023-11-13","2026-11-20"],"y":[-0.02733593863371044,-0.02733593863371044],"style":"dashed"}]},{"id":"partial","title":"Partial regression: SPY","type":"scatter","x":{"label":"SPY | other regressors","type":"number","unit":null},"y":{"label":"AAPL | other regressors"},"series":[{"name":"Observations","kind":"observed","x":[-0.0016036596315247699,0.007014886437511356,0.0003422308612338204,-0.005891964320618743,0.003252070182311586,0.004957042500637666,0.0035826471711569146,-0.006259748767240609,-0.0021626863917341976,-0.006220550260356264,0.00046864285796014305,-0.0014164328279996582,0.0022718449985533497,-0.014504376517115239,0.0002552053547918385,-0.001963386067013408,-0.010687239558480298,0.010050083872348512,0.0049068421563806496,-0.002482122629939949,-0.007007399375048341,0.0005319925266692237,-0.002456381374046145,0.011158559557725677,0.0029002092859081513,0.009618376585058777,-0.0004999713541949324,0.0005082706319965967,0.005955916123788569,0.00016174124416255798,0.0024608370428062347,0.007296571174159384,0.0032115313368555366,0.0014149243829635722,0.0003406958839134839,0.005283645966332008,-0.0022122431415371037,-5.4178358788418784e-05,-0.03018788776483449,-0.00011860352895175078,0.008869232481537107,0.009932710314219799,0.008873705793412531,0.010504373586200837,0.0008396250754410593,0.0018611552732892298,-0.0020874102091725114,0.008419622662728037,0.005328244072983557,0.0032017261694968673,0.00153652659732738,-0.02043002011725963,0.007069469463767722,-0.007083477554987307,-0.0003090824138913891,-0.0036748376935710394,-0.0022896622853617902,-0.00580533929475393,-0.0009524871075785506,-0.0005705002484515094,0.011789358654915939,0.0009062625561319228,0.008482985687627264,-0.014877833192603848,-0.00738747277719019,0.0061278255240839125,0.002284111514046237,-0.005203691389234248,-0.018314923063076746,-0.027627711507382125,0.007050129269487702,-0.0003138117651928232,-0.020976048657368327,-0.06097176147267359,0.017052748247415504,-0.024738235764919014,0.006550881089241915,0.014106616635690109,-0.001916514559480345,0.005677662084100997,-0.0002546861805097864,-0.0017588546060653826,0.009577414133694367,-0.011864984261358789,-0.002989307149773762,0.004319047750762502,-0.008122297925832401,0.0012777536368814943,0.001249544750309673,0.003570659516099259,-0.01716282023522973,0.0071228085995375025,-0.0029670217852913955,-0.004665169445468055,0.002898008116144676,-0.003546944347432611,-0.000962055918430658,0.0040253290168027565,-0.005251187310484675,0.0005253667989757128,-0.003525766200201395,0.0037935664793344445,-0.005846792101525932,-0.00016765774496255327,0.0028286040991379715,-9.089862885448179e-05,-0.009071020814871149,0.008719484954484543,0.002826236682787077,0.005969559534095504,-0.0033742681855100515,0.003913340166133143,-0.008074073860860217,-0.0007406390626332474,-0.005575028580117877,0.004568068233862684,-0.0026257523637249593,-0.013215809868437072,-0.01621215563880755,-0.0032704319114321683,-0.006207993229415588,-0.0062290150071629136,-0.015939272470982008,-0.01467916854753225,0.004916473554141092,0.006859839246711904,0.00511375488706284,0.007232776056326064,0.009445980989392075,-0.0007936864061285204,0.013166597027454763,0.004942095613615431,-0.007328047772707233,-0.0008124202594282625,-0.007676123009349995,-0.01652760567684196,-0.006621412683717178,-0.001103070237119916,-0.001995099337922049,0.007798844344410509,0.0033140085713509815,-0.0017911596431600927,-0.01614314987069864,-0.0026418423708241276,-0.0038336349313800866,-0.007407866063741656,0.002547326409368997,-0.007536536122747202,-0.005295388306068926,-0.0052470885516476395,-0.0007934800625504548,-0.002481695740220906,0.004844592430198806,-0.001242182163609365,0.0035846446790447845,0.006442089165748078,-0.005439972421345727,0.002480948283258941,-0.004277126572036536,-0.03772071792533855],"y":[-0.00944180747051419,0.008430277589100824,0.002378562425409189,-0.010291906806121912,-0.01384244261666363,-0.009366212637358555,-0.0036481610573105548,-0.03730522778547768,-0.003114045790815608,-0.006017551167734124,-0.004302039716993573,-0.020290666968743515,0.007779793295433148,-0.012126252935262009,0.003351551805907601,-0.007432602958266213,-0.02965672018784172,0.001929908151319807,0.01265865894128952,-0.007532339648072601,-0.007864358492962275,0.006362217706712405,-0.02016098829174155,0.0055054197896694575,0.023677126988860448,-0.009963342981063716,0.016689121169507902,0.00533482716482024,0.015642344429673504,0.008387818518199848,-0.020144236338909025,0.01867434841057521,0.0036369327614584972,0.02788234321513894,0.002943602979435837,0.000989918280878375,0.0038617646315331493,0.00047830508324640233,-0.05017424132193193,0.006257667662393421,-0.0014885791278639615,0.009420819478235478,-0.004250001618840982,-0.00040749956280405403,-0.029014209717717638,-0.008453692230177456,0.0003781232193025404,0.004177060953305296,-0.007360750055756698,0.011364969383868048,-0.0016499490195826245,-0.01918653012558224,0.02034230359144308,0.012834136136845996,0.0023556139575833307,-0.0013763527249193329,-0.0006942796819053302,0.005134171965334212,0.006146570917964219,0.002338508413386968,-0.002846312844794721,-0.011257309418782772,-0.03324772618783274,0.030450537923428327,-0.035232952700798716,0.00037621637605022293,-0.0013540108134529596,0.005476530184893644,-0.016682068660392724,-0.05051060084407252,0.0015838330658494424,0.018464605628423572,-0.027762969201372313,-0.07645648014026403,0.03898960202001802,-0.020434268884772663,0.0035209447856863123,-0.0388713560962872,0.004469884144958071,-0.0017227205856556746,-0.0044577080245656875,0.0036472612908099162,0.01548788848980397,-0.014696174471993706,0.02138924729417744,-0.0004185518904331537,-0.017820593695117046,-0.012892450042911742,0.005352681944743822,-0.00025435131837905683,-0.026135277707292015,0.04063011407569985,-0.005966784154551236,-0.00576403401632897,0.008118440801424006,-0.001195793770069679,0.0165828179593626,-0.00549486582032583,0.01709386356107659,0.005726352654257418,-0.01654977013452831,0.005485612820088122,-0.01739261225514383,0.001754428129740295,-0.00044681266583980705,-0.007292646898776292,-0.0008937532325337445,0.0029927524434720672,-0.007997291593950916,0.004921065183011757,0.0010100438989769276,0.004278816808857972,-0.005275030908058108,-0.0058035552514506174,-0.004978964493283337,0.002013692620520426,0.006316794891431466,-0.0029259645925002412,-0.05207370171056826,-0.015181067320060644,-0.005472524935979494,-0.009332992128482685,-0.020382275003055016,-0.01780096502008527,0.0030780681909011232,0.006384200334259393,0.005319473969680511,0.028119022600955834,0.025169329765349354,-0.002635040880978221,0.010825639588335241,0.012915032947403317,0.002974193485174884,0.007334298357635859,-0.016608935142186504,0.0027257436514065048,0.008665132454679139,-0.004945382550087967,0.01637486864526931,0.00818562829665778,0.03854269678046133,-0.00648861696959063,-0.006400781182056488,0.00441233745775388,-0.01175384728286325,0.013584528175414487,-0.002238616677511041,0.024966438873178527,-0.0036075836412726584,-0.006060319333557843,0.0014519721375862915,-0.027765148954733337,0.001403444445440642,0.011971490312579196,-0.0023350124777625865,-0.011873344735049904,-0.019311978183282008,-0.0060663844203917424,0.0030904542361261654,-0.020045347558152283],"style":"points"},{"name":"Slope 1.0080","kind":"calculated","x":[-0.06097176147267359,0.09922766729159946],"y":[-0.06145972467798189,0.10002179640017993],"style":"line"}],"note":"Added-variable plot (Frisch-Waugh-Lovell): both axes are residuals from regressions on the other terms; the slope is the OLS coefficient of the full model."}],"diagnostics":[{"name":"Breusch-Pagan (heteroskedasticity)","statistic":0.37608823092373067,"pvalue":0.5397042200618591,"conclusion":"Fails to reject homoskedasticity at the 5% level (absence of evidence, not proof).","passed":true,"df":1},{"name":"White (heteroskedasticity, general form)","statistic":18.021492912821653,"pvalue":0.00012209068662054668,"conclusion":"Rejects homoskedasticity at the 5% level: variance depends on the regressors, their squares or cross-products.","passed":false},{"name":"Durbin-Watson","statistic":1.8146834812445405,"pvalue":null,"conclusion":"DW = 1.81 (2 = no first-order autocorrelation; below 2 positive, above 2 negative). Indicative only: see Breusch-Godfrey for a test.","passed":true},{"name":"Breusch-Godfrey (serial correlation, 10 lags)","statistic":17.06665895285905,"pvalue":0.07290193898740407,"conclusion":"Fails to reject no serial correlation up to lag 10 at the 5% level (absence of evidence, not proof).","passed":true,"df":10},{"name":"Jarque-Bera (normality of residuals)","statistic":553.5804660550895,"pvalue":6.187698602384753e-121,"conclusion":"Rejects normal residuals at the 5% level: skewness -0.16, kurtosis 7.17; inference rests on large-sample theory, not on exact t and F distributions.","passed":false,"df":2},{"name":"Ramsey RESET (powers 2-3 of fitted values)","statistic":8.300397692922656,"pvalue":0.00027179569784068023,"conclusion":"Rejects a correct linear functional form at the 5% level: powers of the fitted values add explanatory power (non-linearity or omitted variables).","passed":false},{"name":"CUSUM of OLS residuals (parameter stability)","statistic":0.9731198910419722,"pvalue":0.29993469016913055,"conclusion":"Fails to reject stable coefficients over the sample at the 5% level (absence of evidence, not proof).","passed":true},{"name":"Condition number (columns scaled to unit length)","statistic":1.0670931056221713,"pvalue":null,"conclusion":"κ = 1.1. Below 30: no harmful collinearity by the Belsley-Kuh-Welsch rule of thumb.","passed":true}],"assumptions":["Linear model in the parameters, estimated on 759 daily observations common to all symbols (no forward filling).","Alignment: contemporaneous regressors are dated like the dependent variable; every term written [t-k] is k periods earlier; rolling features use periods t-w … t-1 only.","Contemporaneous regressors describe co-movement; they are not known before the dependent return and the fit is not a forecast.","Standard errors: Newey-West HAC, Bartlett kernel, 6 lags (automatic: floor(4 (n/100)^(2/9))), small-sample correction n/(n-k).","Diagnostics are computed on the OLS residuals of the same design (they motivate the choice of estimator and covariance); p-values are asymptotic."],"warnings":[],"methodology":"**Model.** $y_t = x_t'\\beta + \\varepsilon_t$, with $y_t$ the dependent variable and $x_t$ the regressors listed in the coefficient table. Returns are $r_t = \\ln(P_t/P_{t-1})$ (log) or $P_t/P_{t-1}-1$ (simple) on adjusted closes; lagged terms are strictly lagged.\n\n**OLS.** $\\hat\\beta = (X'X)^{-1}X'y$, $\\hat\\sigma^2 = \\hat\\varepsilon'\\hat\\varepsilon/(n-k)$, $R^2 = 1 - \\mathrm{SSR}/\\mathrm{SST}$, $\\bar R^2 = 1-(1-R^2)\\frac{n-1}{n-k}$, $\\mathrm{AIC} = -2\\ell + 2k$, $\\mathrm{BIC} = -2\\ell + k\\ln n$.\n\n**Covariance of $\\hat\\beta$.** Classical: $\\hat\\sigma^2(X'X)^{-1}$. HC0: $(X'X)^{-1}X'\\mathrm{diag}(\\hat\\varepsilon_t^2)X(X'X)^{-1}$; HC1 scales by $n/(n-k)$; HC2 and HC3 divide $\\hat\\varepsilon_t^2$ by $(1-h_t)$ and $(1-h_t)^2$. HAC (Newey-West): $\\hat S = \\hat\\Gamma_0 + \\sum_{l=1}^{L}\\big(1-\\tfrac{l}{L+1}\\big)(\\hat\\Gamma_l+\\hat\\Gamma_l')$ with $L = \\lfloor 4(n/100)^{2/9}\\rfloor$ when automatic (here $n=759$, $L=6$). Clustered: sums of scores within calendar months, with the $\\frac{G}{G-1}\\frac{n-1}{n-k}$ correction. Used here: Newey-West HAC, Bartlett kernel, 6 lags (automatic: floor(4 (n/100)^(2/9))), small-sample correction n/(n-k).\n\n**Diagnostics.** Breusch-Pagan and White: $nR^2$ of $\\hat\\varepsilon^2$ on the regressors (and their squares and cross-products), $\\chi^2$. Durbin-Watson: $\\sum(\\hat\\varepsilon_t-\\hat\\varepsilon_{t-1})^2/\\sum\\hat\\varepsilon_t^2$. Breusch-Godfrey: LM test of residuals on their own lags and $X$. Jarque-Bera: $\\frac{n}{6}(S^2+\\frac{(K-3)^2}{4})$. RESET: F-test of $\\hat y^2,\\hat y^3$ added to the model. VIF: $1/(1-R_j^2)$. Condition number: ratio of the extreme singular values of $X$ with unit-length columns. CUSUM: supremum of the scaled cumulated OLS residuals against Brownian-bridge bounds (Ploberger-Krämer).\n\n**Rolling regression.** OLS re-estimated on each trailing window of fixed length; pointwise bands, not a joint confidence region. **Influence.** Leverage $h_t = x_t'(X'X)^{-1}x_t$, externally studentized residuals, Cook's distance and DFFITS.","provenance":{"data":[{"symbol":"AAPL","provider":"FMP","retrievedAt":"2026-11-20T23:35:27+00:00","start":"2023-10-30","end":"2026-11-20","observations":769,"frequency":"1d","adjusted":"split_div","currency":null},{"symbol":"SPY","provider":"FMP","retrievedAt":"2026-11-20T23:35:28+00:00","start":"2023-10-30","end":"2026-11-20","observations":769,"frequency":"1d","adjusted":"split_div","currency":null}],"spec":{"symbol":"AAPL","regressors":["SPY"],"dependent":"returns","return_type":"log","frequency":"daily","data_period":756,"start":null,"end":null,"intercept":true,"lags_dependent":0,"lags_regressors":0,"squared_regressors":false,"rolling_vol":false,"vol_window":21,"volume_change":false,"dow_dummies":false,"month_dummies":false,"estimator":"ols","covariance":"HAC","hac_lags":0,"wls_weights":"inverse_rolling_variance","wls_halflife":126,"prior_mean":0,"prior_scale":1000000,"prior_a":0,"prior_b":0,"confidence":0.95,"rolling_window":126,"partial_regressor":null},"seed":null,"software":{"python":"3.14.4","numpy":"2.4.6","pandas":"3.0.3","scipy":"1.17.1","statsmodels":"0.14.6","arch":"8.0.0","scikit-learn":"1.8.0"},"computedAt":"2026-11-20T23:35:28+00:00","durationMs":2727,"reproduce":"import numpy as np, pandas as pd, statsmodels.api as sm\n# px: adjusted closes, one column per symbol (AAPL, SPY), sessions common to all, daily bars\npx = pd.read_csv(\"closes.csv\", index_col=0, parse_dates=True).dropna()\nT = np.log(px / px.shift(1))\ny = T[\"AAPL\"]\nX = T[['SPY']].copy()\nX = sm.add_constant(X)\nd = pd.concat([y.rename(\"y\"), X], axis=1).dropna().loc[\"2023-11-11\":]\ny, X = d[\"y\"], d.drop(columns=\"y\")\nres = sm.OLS(y, X).fit(cov_type=\"HAC\", cov_kwds={\"maxlags\": 6, \"use_correction\": True}, use_t=True)\nprint(res.summary())"}}}}2
Files main
Menu

Theme