SPB Git

Repository Public

job_factor_model.json 55.6 KB 2 lines json

1{"job":{"id":"49f74ff8-aeb7-41d5-9d87-4eff1bd4981d","tool":"factor_model","params":{"symbols":["AAPL"],"model":"ff3","factors":"auto","custom_excess":true,"risk_free_symbol":"BIL","frequency":"daily","data_period":1260,"hac_lags":0,"confidence":0.95,"rolling_window":126},"status":"done","startedAt":1795217753646,"finishedAt":1795217757098,"error":null,"progress":1,"engineVersion":"1.0.0","durationMs":3452,"projectId":null,"sessionId":null,"cancellable":false,"code":"import numpy as np, pandas as pd, statsmodels.api as sm\nimport io, zipfile, urllib.request\ndef french(name, cols):\n    req = urllib.request.Request(\"https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/\" + name, headers={\"User-Agent\": \"Mozilla/5.0\"})\n    z = zipfile.ZipFile(io.BytesIO(urllib.request.urlopen(req).read()))\n    rows = [l.split(\",\")[:len(cols) + 1] for l in z.read(z.namelist()[0]).decode(\"latin-1\").splitlines() if l[:8].isdigit()]\n    f = pd.DataFrame(rows, columns=[\"date\"] + cols).set_index(\"date\").astype(float) / 100\n    f.index = pd.to_datetime(f.index, format=\"%Y%m%d\"); return f\nff = french(\"F-F_Research_Data_Factors_daily_CSV.zip\", ['MKT', 'SMB', 'HML', 'RF'])\nr = pd.read_csv(\"closes.csv\", index_col=0, parse_dates=True)[\"AAPL\"].pct_change()  # adjusted closes\nd = pd.concat([r.rename(\"r\"), ff], axis=1, join=\"inner\").dropna().loc[\"2021-11-10\":]\nres = sm.OLS(d[\"r\"] - d[\"RF\"], sm.add_constant(d[['MKT', 'SMB', 'HML']])).fit(cov_type=\"HAC\", cov_kwds={\"maxlags\": 6, \"use_correction\": True}, use_t=True)\nprint(res.summary()); print(\"alpha, annualised:\", res.params[\"const\"] * 252)","result":{"success":true,"schema":"lab/1","engine":"factor_model","engineVersion":"1.0.0","title":"AAPL — Fama-French 3-factor","headline":"AAPL, Fama-French 3-factor on Kenneth French library factors, 1226 daily observations (2021-11-10 → 2026-09-30): alpha +7.11% per year (t = 0.77), β MKT = 1.12, R² = 0.51.","summary":[{"label":"Alpha AAPL (annualised)","value":0.07108301864573414,"unit":"percent","kind":"calculated","decimals":2,"note":"t = 0.77, p = 0.441"},{"label":"β MKT","value":1.1169730020875381,"unit":"ratio","kind":"calculated","decimals":3,"note":"HAC s.e. 0.057"},{"label":"β SMB","value":-0.2403204327916219,"unit":"ratio","kind":"calculated","decimals":3,"note":"HAC s.e. 0.054"},{"label":"β HML","value":-0.18297281016650674,"unit":"ratio","kind":"calculated","decimals":3,"note":"HAC s.e. 0.048"},{"label":"R²","value":0.5146549344258156,"unit":"ratio","kind":"calculated","decimals":3},{"label":"Appraisal ratio","value":0.3606019157478059,"unit":"ratio","kind":"calculated","decimals":2},{"label":"Observations","value":1226,"unit":"count","kind":"observed"}],"tables":[{"id":"alphas","title":"Alpha and fit","columns":[{"key":"symbol","label":"Asset","type":"text"},{"key":"alpha_annual","label":"Alpha (annualised)","unit":"percent","decimals":2,"type":"number"},{"key":"alpha_ci_low","label":"95% CI low","unit":"percent","decimals":2,"type":"number"},{"key":"alpha_ci_high","label":"95% CI high","unit":"percent","decimals":2,"type":"number"},{"key":"t_alpha","label":"t(alpha)","decimals":2,"type":"number"},{"key":"p_alpha","label":"p-value","decimals":4,"type":"number"},{"key":"alpha_period","label":"Alpha per period","decimals":6,"type":"number"},{"key":"r2","label":"R²","decimals":4,"type":"number"},{"key":"adj_r2","label":"Adj. R²","decimals":4,"type":"number"},{"key":"resid_vol","label":"Residual volatility (annualised)","unit":"percent","decimals":2,"type":"number"},{"key":"appraisal_ratio","label":"Appraisal ratio","decimals":3,"type":"number"},{"key":"mean_excess","label":"Mean excess return (annualised)","unit":"percent","decimals":2,"type":"number"},{"key":"n","label":"Obs.","type":"integer"}],"rows":[{"symbol":"AAPL","alpha_period":0.00028207547081640535,"alpha_annual":0.07108301864573414,"alpha_ci_low":-0.10975961428696447,"alpha_ci_high":0.2519256515784328,"t_alpha":0.7711582289485751,"p_alpha":0.44076223021397637,"r2":0.5146549344258156,"adj_r2":0.5134634162615582,"resid_vol":0.1971232418394789,"appraisal_ratio":0.3606019157478059,"mean_excess":0.16879518599340138,"n":1226}],"note":"Alpha annualised arithmetically (per-period alpha × 252). HAC standard errors, Bartlett kernel, 6 lags. Appraisal ratio = annualised alpha / annualised residual volatility (the information ratio against the factor-mimicking benchmark)."},{"id":"betas","title":"Factor loadings","columns":[{"key":"symbol","label":"Asset","type":"text"},{"key":"factor","label":"Factor","type":"text"},{"key":"beta","label":"Beta","decimals":4,"type":"number"},{"key":"std_error","label":"HAC std. error","decimals":4,"type":"number"},{"key":"t","label":"t","decimals":2,"type":"number"},{"key":"p_value","label":"p-value","decimals":4,"type":"number"},{"key":"ci_low","label":"95% CI low","decimals":4,"type":"number"},{"key":"ci_high","label":"95% CI high","decimals":4,"type":"number"}],"rows":[{"symbol":"AAPL","factor":"MKT","beta":1.1169730020875381,"std_error":0.057354238597906095,"t":19.474986145632784,"p_value":8.744786241313716e-74,"ci_low":1.0044493096808302,"ci_high":1.229496694494246},{"symbol":"AAPL","factor":"SMB","beta":-0.2403204327916219,"std_error":0.05401310897460761,"t":-4.4492982787678494,"p_value":9.400181978379089e-06,"ci_low":-0.3462891390070092,"ci_high":-0.13435172657623462},{"symbol":"AAPL","factor":"HML","beta":-0.18297281016650674,"std_error":0.04783579347448052,"t":-3.8250188170103048,"p_value":0.00013736566855350506,"ci_low":-0.2768221967600507,"ci_high":-0.0891234235729628}],"note":"t-tests are against zero; for the market beta the economically interesting null is often 1."},{"id":"attribution","title":"Return attribution over the period","columns":[{"key":"symbol","label":"Asset","type":"text"},{"key":"component","label":"Component","type":"text"},{"key":"contribution","label":"Contribution to total return","unit":"percent","decimals":2,"type":"number"}],"rows":[{"symbol":"AAPL","component":"Risk-free","contribution":0.2678552921195645},{"symbol":"AAPL","component":"MKT","contribution":0.5614986099648173},{"symbol":"AAPL","component":"SMB","contribution":0.09981048131548662},{"symbol":"AAPL","component":"HML","contribution":-0.08187621441826107},{"symbol":"AAPL","component":"Alpha","contribution":0.4784780100020199},{"symbol":"AAPL","component":"Residual","contribution":-0.06510041811406922},{"symbol":"AAPL","component":"Total return","contribution":1.260665760869554}],"note":"Per-period contribution of factor k = beta_k × factor return, weighted by the asset's wealth at the start of each period so that the components add up exactly to the compounded total return. In-sample betas: an accounting decomposition, not a forecast."},{"id":"factors","title":"Factor returns over the sample","columns":[{"key":"factor","label":"Factor","type":"text"},{"key":"mean_annual","label":"Mean (annualised)","unit":"percent","decimals":2,"type":"number"},{"key":"vol_annual","label":"Volatility (annualised)","unit":"percent","decimals":2,"type":"number"},{"key":"t_mean","label":"t(mean)","decimals":2,"type":"number"},{"key":"cumulative","label":"Compounded","unit":"percent","decimals":2,"type":"number"}],"rows":[{"factor":"MKT","mean_annual":0.08275301794453509,"vol_annual":0.17821990203569488,"t_mean":1.0241713086315314,"cumulative":0.384636646656094},{"factor":"SMB","mean_annual":-0.06189004893964111,"vol_annual":0.1079427669449229,"t_mean":-1.2646555214450572,"cumulative":-0.280659564573439},{"factor":"HML","mean_annual":0.05243491027732464,"vol_annual":0.13967125897325508,"t_mean":0.8280535932577311,"cumulative":0.23078917865022341},{"factor":"RF","mean_annual":0.038663295269168035,"vol_annual":0.0011696691176531183,"t_mean":null,"cumulative":0.20693277822573464}],"note":"RF is the risk-free return."}],"charts":[{"id":"factor_corr","title":"Factor correlations","type":"heatmap","x":{"label":"Factor","type":"category"},"y":{"label":"Factor"},"series":[],"z":{"label":"Correlation","unit":"ratio"},"matrix":{"x":["MKT","SMB","HML"],"y":["MKT","SMB","HML"],"z":[[0.9999999999999999,0.3424452819430464,-0.3827245400433992],[0.3424452819430464,1,-0.15667929394975716],[-0.3827245400433992,-0.1566792939497572,0.9999999999999998]]}},{"id":"rolling_betas_AAPL","title":"Rolling betas: AAPL (126-period window)","type":"line","x":{"label":"Window end","type":"time"},"y":{"label":"Beta"},"series":[{"name":"β MKT","kind":"calculated","x":["2022-05-11","2022-05-20","2022-06-01","2022-06-10","2022-06-22","2022-07-01","2022-07-13","2022-07-21","2022-08-01","2022-08-10","2022-08-19","2022-08-30","2022-09-09","2022-09-20","2022-09-29","2022-10-10","2022-10-19","2022-10-28","2022-11-08","2022-11-16","2022-11-28","2022-12-07","2022-12-16","2022-12-28","2023-01-09","2023-01-19","2023-01-30","2023-02-08","2023-02-17","2023-03-01","2023-03-10","2023-03-20","2023-03-29","2023-04-10","2023-04-19","2023-04-28","2023-05-09","2023-05-18","2023-05-30","2023-06-08","2023-06-20","2023-06-29","2023-07-11","2023-07-19","2023-07-28","2023-08-08","2023-08-17","2023-08-28","2023-09-07","2023-09-18","2023-09-27","2023-10-06","2023-10-17","2023-10-26","2023-11-06","2023-11-15","2023-11-24","2023-12-05","2023-12-14","2023-12-26","2024-01-05","2024-01-17","2024-01-26","2024-02-06","2024-02-15","2024-02-27","2024-03-07","2024-03-18","2024-03-26","2024-04-05","2024-04-16","2024-04-25","2024-05-06","2024-05-15","2024-05-24","2024-06-05","2024-06-14","2024-06-26","2024-07-08","2024-07-17","2024-07-25","2024-08-05","2024-08-14","2024-08-23","2024-09-04","2024-09-13","2024-09-24","2024-10-03","2024-10-14","2024-10-23","2024-11-01","2024-11-12","2024-11-20","2024-12-02","2024-12-11","2024-12-20","2025-01-02","2025-01-14","2025-01-24","2025-02-04","2025-02-13","2025-02-25","2025-03-06","2025-03-17","2025-03-25","2025-04-03","2025-04-14","2025-04-24","2025-05-05","2025-05-14","2025-05-23","2025-06-04","2025-06-13","2025-06-25","2025-07-07","2025-07-16","2025-07-25","2025-08-04","2025-08-13","2025-08-22","2025-09-03","2025-09-12","2025-09-23","2025-10-02","2025-10-13","2025-10-22","2025-10-31","2025-11-11","2025-11-20","2025-12-01","2025-12-10","2025-12-19","2025-12-31","2026-01-12","2026-01-22","2026-02-02","2026-02-11","2026-02-23","2026-03-04","2026-03-13","2026-03-24","2026-04-01","2026-04-13","2026-04-22","2026-05-01","2026-05-12","2026-05-21","2026-06-02","2026-06-11","2026-06-23","2026-07-02","2026-07-14","2026-07-23","2026-07-31","2026-08-11","2026-08-20","2026-08-31","2026-09-10","2026-09-21","2026-09-30"],"y":[1.0564247808414458,1.0942257634185117,1.1633692004487837,1.1980005618641,1.1859057868395877,1.1614295580106386,1.1492335563897347,1.1162606423692913,1.1102270414822082,1.131441463173722,1.13563285593301,1.1468330432211644,1.1531559504008921,1.1766216744513258,1.1538531653321642,1.1529044229996284,1.1551913063262569,1.2015737662384958,1.1919444984767449,1.2123017678740269,1.1886272619791447,1.1803137223179168,1.1948824229936088,1.2194266048500504,1.2466461905662083,1.2730472435465483,1.2620850387840323,1.234947047844399,1.229970909009725,1.2453303746874964,1.251116990449825,1.2559433291394786,1.277816688289817,1.3053985206550434,1.3285415541046026,1.336597248506334,1.2973182937789216,1.2680699140421174,1.2516161427173165,1.2330690478280513,1.1857195984634428,1.1706821747726264,1.087387138509668,1.0788707486366815,1.1086766864888293,1.1303052050098885,1.1191399785381324,1.14659602878664,1.1571643184061227,1.189781831910758,1.1935516902748085,1.1582027518597493,1.1128735559194867,1.0797261723607672,1.006991702789171,1.02858124276015,1.044826207001176,1.0452626767865263,1.079459469957726,1.0523539351048452,1.0791225465281153,1.0995057854682326,1.1264239367916022,1.084949046174585,1.0743877699858366,0.9952799451179369,0.9107130758515577,0.8604761579856745,0.8623181064309461,0.8334700691747089,0.8278280253021744,0.8353158182124856,0.8413041701765608,0.8178729373778563,0.8580135417759965,0.8122905060526358,0.7857001904638464,0.8551004601917557,0.876143700723033,0.9178451925264587,0.8504492685888357,0.9083587538169402,0.8658790053175769,0.894390919293055,0.894820856162506,0.9039530434431534,0.9456517420422997,0.9716296990741751,1.0153980852488589,0.9782786145528348,0.9138068977244564,0.8713279522981324,0.8754114478570428,0.8559387773782998,0.8391620999570206,0.8209541090153014,0.8002387930890034,0.7553438083380416,0.787669773434354,0.8328603267134804,0.7884964519777972,0.7706407080032824,0.75734017350989,0.9427336964048878,0.9392639035858803,1.1735026682323728,1.3119978034145017,1.3152780679903902,1.2980460757410988,1.3796366381389535,1.3813919985126946,1.3768273508435875,1.3943642393589943,1.4255029262130663,1.4361639485801285,1.4330267544055175,1.4388856854782177,1.4327783965874081,1.4287428989825883,1.4364565925529555,1.4593290418329115,1.4344477381002094,1.4459704132879165,1.4380013058634105,1.261710648794034,1.290240295118351,1.4272806845934822,1.2116301140268706,1.122026830261465,1.0692522708224261,1.0447534558790288,0.9940540334816161,0.9964767041438637,0.9448549242446145,0.996849399281627,1.0041401886389516,0.8798055831046044,0.969180012729411,0.9726233001720374,1.0760648638260588,1.0564699534259514,1.0564419553869993,1.0321832050765385,0.9739595201732827,0.8995858195533495,0.9844588054301656,0.9652234639261759,1.0043016134367508,0.92125014645966,0.9004872701254846,0.8497122645332139,0.8622727336473686,0.8299962763744883,0.7273391396309736,0.6909579356781309,0.591010405647136,0.5559491749094029,0.5736838768612523,0.5320491980179796,0.5253574628616249]},{"name":"β SMB","kind":"calculated","x":["2022-05-11","2022-05-20","2022-06-01","2022-06-10","2022-06-22","2022-07-01","2022-07-13","2022-07-21","2022-08-01","2022-08-10","2022-08-19","2022-08-30","2022-09-09","2022-09-20","2022-09-29","2022-10-10","2022-10-19","2022-10-28","2022-11-08","2022-11-16","2022-11-28","2022-12-07","2022-12-16","2022-12-28","2023-01-09","2023-01-19","2023-01-30","2023-02-08","2023-02-17","2023-03-01","2023-03-10","2023-03-20","2023-03-29","2023-04-10","2023-04-19","2023-04-28","2023-05-09","2023-05-18","2023-05-30","2023-06-08","2023-06-20","2023-06-29","2023-07-11","2023-07-19","2023-07-28","2023-08-08","2023-08-17","2023-08-28","2023-09-07","2023-09-18","2023-09-27","2023-10-06","2023-10-17","2023-10-26","2023-11-06","2023-11-15","2023-11-24","2023-12-05","2023-12-14","2023-12-26","2024-01-05","2024-01-17","2024-01-26","2024-02-06","2024-02-15","2024-02-27","2024-03-07","2024-03-18","2024-03-26","2024-04-05","2024-04-16","2024-04-25","2024-05-06","2024-05-15","2024-05-24","2024-06-05","2024-06-14","2024-06-26","2024-07-08","2024-07-17","2024-07-25","2024-08-05","2024-08-14","2024-08-23","2024-09-04","2024-09-13","2024-09-24","2024-10-03","2024-10-14","2024-10-23","2024-11-01","2024-11-12","2024-11-20","2024-12-02","2024-12-11","2024-12-20","2025-01-02","2025-01-14","2025-01-24","2025-02-04","2025-02-13","2025-02-25","2025-03-06","2025-03-17","2025-03-25","2025-04-03","2025-04-14","2025-04-24","2025-05-05","2025-05-14","2025-05-23","2025-06-04","2025-06-13","2025-06-25","2025-07-07","2025-07-16","2025-07-25","2025-08-04","2025-08-13","2025-08-22","2025-09-03","2025-09-12","2025-09-23","2025-10-02","2025-10-13","2025-10-22","2025-10-31","2025-11-11","2025-11-20","2025-12-01","2025-12-10","2025-12-19","2025-12-31","2026-01-12","2026-01-22","2026-02-02","2026-02-11","2026-02-23","2026-03-04","2026-03-13","2026-03-24","2026-04-01","2026-04-13","2026-04-22","2026-05-01","2026-05-12","2026-05-21","2026-06-02","2026-06-11","2026-06-23","2026-07-02","2026-07-14","2026-07-23","2026-07-31","2026-08-11","2026-08-20","2026-08-31","2026-09-10","2026-09-21","2026-09-30"],"y":[-0.25737216948515895,-0.3055427066430627,-0.39614905331789174,-0.3996688846036507,-0.4316468087906,-0.4288040121342438,-0.35401533963420173,-0.4109654820267221,-0.3721546605245081,-0.4376759241610584,-0.5222329663101171,-0.5179407033668955,-0.5363986625416004,-0.5719040929264627,-0.6632413075035544,-0.6995376517392846,-0.7419095687388686,-0.8380205649573222,-0.7965388134160276,-0.737250425971919,-0.6763585244824419,-0.6950637260390291,-0.7164263797022852,-0.8000142419173037,-0.7897035063588496,-0.8426803779544849,-0.8579747966314568,-0.691014323700001,-0.6000713358768048,-0.6063487937078937,-0.7165695041639668,-0.6563853805437618,-0.6655094740590248,-0.5910489353026547,-0.6057173785134435,-0.59015066066586,-0.43122625613589616,-0.47533798743902844,-0.42842712065514,-0.3311774073836464,-0.30404907691419836,-0.32418085005833286,-0.31873186109247803,-0.28840938508490216,-0.27801952552108666,-0.27203688466233844,-0.26759747652053023,-0.2668475050708014,-0.17444619925338906,-0.15257471094902092,-0.14209419712070426,-0.13664378576548797,-0.1824565296858468,-0.16043197904223813,-0.21553906933681433,-0.21177926305993308,-0.21557320947680117,-0.22981586911951937,-0.20562691905686128,-0.21186395454275675,-0.18367518751575038,-0.1626240043840642,-0.12030700691613891,-0.1414430964110291,-0.18536651464648393,-0.16647387597491486,-0.08673787342656222,-0.11301215520085682,-0.0693094846906198,-0.009631358162626169,0.04429986344466824,0.04852483955461495,0.07998118542203014,0.15776655463381978,0.1702942559410625,0.20545635194914058,0.27563599229380753,0.2620873301902955,0.20328182887032786,0.11165197487157666,0.11353973029704778,0.0632506349194176,0.04858288321891152,0.026933059920203117,-0.0007924434636956135,-0.031724547184147356,-0.023948556451730496,-0.030015595204998413,-0.0953314642159453,-0.05840069969846212,-0.048799062510033686,-0.09678799382384504,-0.1536017178269922,-0.14676354262048885,-0.1927150555346378,-0.22333390739145753,-0.1669423809691561,-0.11233435974338801,-0.2581368373687336,-0.26690069964137025,-0.24525076692541836,-0.27588583197335304,-0.3566358303358901,-0.4655803678072049,-0.5490528810649067,-0.6606605527595651,-0.5871837048690288,-0.5760525814476276,-0.6700839842571402,-0.4605869179926999,-0.39626724503543853,-0.42904711793367545,-0.46286454197285143,-0.4177481217473371,-0.3738165157908476,-0.3755385732926759,-0.28688243296758686,-0.24504212210023701,-0.3025955731273676,-0.25235127576053973,-0.25761297174875575,-0.17359423495068804,-0.17205832063785143,-0.1453336719273901,-0.30350290451580375,-0.2796045757378939,-0.3055659034944286,-0.2587132129015971,-0.21460788739395475,-0.19253000657790342,-0.21350236661886612,-0.16541641348900538,-0.16704749075679037,-0.21137060269642016,-0.23225533272358362,-0.27922321113656146,-0.19465147609223743,-0.3676297194516157,-0.34024828491016545,-0.4957558053641133,-0.40218280559522135,-0.34433346518143115,-0.36343267664573253,-0.27911113848511293,-0.17063808485297982,-0.20354198283135327,-0.24287710240385763,-0.3212396205278514,-0.20592182224158617,-0.2147496523799141,-0.15125181489365774,-0.07694764105622642,0.09933289559646752,0.4009767560310329,0.3786189510242956,0.5069368843981812,0.4535520315870918,0.2779873597921303,0.2737120782237198,0.24108396355862127]},{"name":"β HML","kind":"calculated","x":["2022-05-11","2022-05-20","2022-06-01","2022-06-10","2022-06-22","2022-07-01","2022-07-13","2022-07-21","2022-08-01","2022-08-10","2022-08-19","2022-08-30","2022-09-09","2022-09-20","2022-09-29","2022-10-10","2022-10-19","2022-10-28","2022-11-08","2022-11-16","2022-11-28","2022-12-07","2022-12-16","2022-12-28","2023-01-09","2023-01-19","2023-01-30","2023-02-08","2023-02-17","2023-03-01","2023-03-10","2023-03-20","2023-03-29","2023-04-10","2023-04-19","2023-04-28","2023-05-09","2023-05-18","2023-05-30","2023-06-08","2023-06-20","2023-06-29","2023-07-11","2023-07-19","2023-07-28","2023-08-08","2023-08-17","2023-08-28","2023-09-07","2023-09-18","2023-09-27","2023-10-06","2023-10-17","2023-10-26","2023-11-06","2023-11-15","2023-11-24","2023-12-05","2023-12-14","2023-12-26","2024-01-05","2024-01-17","2024-01-26","2024-02-06","2024-02-15","2024-02-27","2024-03-07","2024-03-18","2024-03-26","2024-04-05","2024-04-16","2024-04-25","2024-05-06","2024-05-15","2024-05-24","2024-06-05","2024-06-14","2024-06-26","2024-07-08","2024-07-17","2024-07-25","2024-08-05","2024-08-14","2024-08-23","2024-09-04","2024-09-13","2024-09-24","2024-10-03","2024-10-14","2024-10-23","2024-11-01","2024-11-12","2024-11-20","2024-12-02","2024-12-11","2024-12-20","2025-01-02","2025-01-14","2025-01-24","2025-02-04","2025-02-13","2025-02-25","2025-03-06","2025-03-17","2025-03-25","2025-04-03","2025-04-14","2025-04-24","2025-05-05","2025-05-14","2025-05-23","2025-06-04","2025-06-13","2025-06-25","2025-07-07","2025-07-16","2025-07-25","2025-08-04","2025-08-13","2025-08-22","2025-09-03","2025-09-12","2025-09-23","2025-10-02","2025-10-13","2025-10-22","2025-10-31","2025-11-11","2025-11-20","2025-12-01","2025-12-10","2025-12-19","2025-12-31","2026-01-12","2026-01-22","2026-02-02","2026-02-11","2026-02-23","2026-03-04","2026-03-13","2026-03-24","2026-04-01","2026-04-13","2026-04-22","2026-05-01","2026-05-12","2026-05-21","2026-06-02","2026-06-11","2026-06-23","2026-07-02","2026-07-14","2026-07-23","2026-07-31","2026-08-11","2026-08-20","2026-08-31","2026-09-10","2026-09-21","2026-09-30"],"y":[-0.31501968034480904,-0.27300346232972794,-0.2391221465193349,-0.20210797455054025,-0.18772162136035736,-0.21403237045748275,-0.21163715128407212,-0.27744941278994,-0.24463675394754397,-0.2706313153153707,-0.31125409669910853,-0.310071438143634,-0.3042608118614237,-0.30465425607440394,-0.380476808985827,-0.37329091023021993,-0.3802845998302949,-0.4166469768420361,-0.4609538941220394,-0.45176207537489377,-0.4671352621740623,-0.5188280892846575,-0.5293329004352394,-0.6130208610727824,-0.5581712057725083,-0.5419119592275898,-0.6150807138622623,-0.5603744397879272,-0.5438056501560657,-0.5605330722639907,-0.6651083634547975,-0.5844249653989725,-0.5676561648241534,-0.523506176641751,-0.5776310167561897,-0.5711156294248192,-0.4521868011876195,-0.4495007101381914,-0.41722849223181074,-0.345791983247591,-0.3469095132140822,-0.32258288849682615,-0.35959830262354175,-0.3498811166666995,-0.339510244740377,-0.4034390258044758,-0.4014972438086335,-0.41894305412934973,-0.4253611396455828,-0.41761852164282437,-0.40990058080519015,-0.42656634399035226,-0.3816606209171368,-0.41514719787207205,-0.4624277774533848,-0.4498279690012818,-0.45818850088782914,-0.4844729564307643,-0.47555157093525163,-0.4328171006822836,-0.4619804314404826,-0.4478285604195959,-0.5391176649396814,-0.4234381858836348,-0.40423048133672174,-0.32488189291771624,-0.4093303323654866,-0.3684041718674164,-0.4460532159459014,-0.4261343455729175,-0.4679960650154315,-0.44721935569881677,-0.4783487154962429,-0.4694389877857026,-0.4336893944283393,-0.4168150308722458,-0.5539176010473865,-0.5274947338415947,-0.515656783024282,-0.5237577477630503,-0.5282060789085341,-0.4989789528525841,-0.4436357832145231,-0.4169860491111942,-0.3619166742877124,-0.323740750135978,-0.27816127598973417,-0.27134754129098165,-0.25451398738864417,-0.32936598040634774,-0.320664354243788,-0.4167929811392225,-0.3664869443887534,-0.4009193664265306,-0.30602746382730706,-0.33205626185939685,-0.32656200450122336,-0.31726628319957156,-0.2310244230487273,-0.12470971886820567,-0.13102755261475835,-0.10719915794929949,-0.08105911978048008,-0.1055854400082098,-0.10133875040272262,-0.02058349775082626,-0.09348825497383068,-0.05904405670018053,-0.06484054205806242,0.16793570509905725,0.18075486171682764,0.15410117676038992,0.1665145819987818,0.255012193986213,0.31126903396756733,0.27946427476748387,0.30018639073621856,0.22332376950132082,0.14560629178251638,0.14127031768118606,0.11737173399439887,0.053632189111673084,-0.060861871599745584,-0.09840804979804907,0.03459655638101791,0.06971078372523545,0.1434175232791914,0.19167741227077226,0.20229589836735345,0.24112377553264755,0.24483964234430797,0.1890512194708407,0.14953722842032485,0.10435391035167335,0.08326498763899416,0.07688582244179173,0.21111101136932114,0.16668622422256973,0.20301125935150424,0.2559506369338624,0.37607307180121413,0.3855043290648049,0.38268290899683943,0.2385484827595069,0.2366146779954862,0.27975448625293664,0.19634241373117858,0.2623916272235148,0.21431578910001017,0.16532775093754432,0.022706670470842023,0.04680263016228921,0.12560148490254588,0.2469723755234362,0.12162413038077527,0.0864353703280914,0.06953447032343281,0.11264783086837601,0.09153803209622582,0.13297070307622907]}],"note":"OLS on the trailing 126 periods ending at each date. Overlapping windows: consecutive points are highly correlated."},{"id":"cumulative","title":"AAPL: growth of 1, actual vs factor exposure","type":"line","x":{"label":"Date","type":"time"},"y":{"label":"Growth of 1","log":true},"series":[{"name":"AAPL (total return)","kind":"observed","x":["2021-11-10","2021-11-22","2021-12-02","2021-12-14","2021-12-27","2022-01-06","2022-01-18","2022-01-28","2022-02-09","2022-02-18","2022-03-03","2022-03-15","2022-03-24","2022-04-05","2022-04-18","2022-04-28","2022-05-09","2022-05-19","2022-06-01","2022-06-10","2022-06-23","2022-07-06","2022-07-15","2022-07-27","2022-08-08","2022-08-18","2022-08-29","2022-09-09","2022-09-21","2022-09-30","2022-10-12","2022-10-24","2022-11-03","2022-11-14","2022-11-25","2022-12-07","2022-12-16","2022-12-29","2023-01-11","2023-01-23","2023-02-02","2023-02-14","2023-02-27","2023-03-08","2023-03-20","2023-03-30","2023-04-11","2023-04-21","2023-05-03","2023-05-15","2023-05-24","2023-06-06","2023-06-16","2023-06-28","2023-07-11","2023-07-21","2023-08-01","2023-08-11","2023-08-23","2023-09-05","2023-09-14","2023-09-26","2023-10-06","2023-10-17","2023-10-27","2023-11-08","2023-11-17","2023-11-30","2023-12-12","2023-12-22","2024-01-04","2024-01-17","2024-01-29","2024-02-07","2024-02-20","2024-03-01","2024-03-13","2024-03-22","2024-04-04","2024-04-16","2024-04-25","2024-05-07","2024-05-17","2024-05-29","2024-06-10","2024-06-21","2024-07-03","2024-07-15","2024-07-25","2024-08-06","2024-08-15","2024-08-27","2024-09-09","2024-09-19","2024-09-30","2024-10-10","2024-10-22","2024-10-31","2024-11-12","2024-11-22","2024-12-04","2024-12-16","2024-12-27","2025-01-10","2025-01-22","2025-02-03","2025-02-13","2025-02-25","2025-03-07","2025-03-19","2025-03-28","2025-04-09","2025-04-22","2025-05-02","2025-05-13","2025-05-23","2025-06-05","2025-06-16","2025-06-27","2025-07-10","2025-07-22","2025-07-31","2025-08-12","2025-08-22","2025-09-03","2025-09-15","2025-09-25","2025-10-06","2025-10-16","2025-10-28","2025-11-07","2025-11-18","2025-12-01","2025-12-11","2025-12-22","2026-01-05","2026-01-15","2026-01-28","2026-02-06","2026-02-19","2026-03-03","2026-03-12","2026-03-24","2026-04-06","2026-04-15","2026-04-27","2026-05-07","2026-05-19","2026-05-29","2026-06-10","2026-06-23","2026-07-02","2026-07-15","2026-07-27","2026-08-05","2026-08-17","2026-08-27","2026-09-09","2026-09-18","2026-09-30"],"y":[0.9808423913043479,1.0676630434782606,1.0858695652173913,1.1559782608695652,1.1957201086956524,1.1404891304347828,1.125883152173913,1.129415760869565,1.1703804347826086,1.110733695652174,1.1036684782608694,1.0296874999999996,1.1557065217391302,1.162296195652174,1.0959239130434781,1.0864130434782604,1.0110733695652172,0.9132472826086951,0.988790760869565,0.9117527173913041,0.9193614130434781,0.9502717391304345,0.9985054347826083,1.042527173913043,1.0977581521739126,1.159510869565217,1.0745244565217387,1.0478260869565212,1.0235054347826078,0.9201766304347816,0.9211277173913034,0.9950407608695638,0.9247282608695638,0.9889266304347808,0.987771739130433,0.9399456521739112,0.8970788043478244,0.8644021739130417,0.8902853260869548,0.941100543478259,1.005842391304346,1.0233016304347806,0.9880434782608677,1.021059782608694,1.051358695652172,1.0845108695652157,1.0740489130434767,1.102241847826085,1.1184782608695634,1.1509510869565198,1.14938858695652,1.1987092391304335,1.23688858695652,1.2658288043478245,1.2580163043478247,1.2838315217391294,1.3083559782608685,1.1907608695652165,1.2131114130434772,1.2705842391304338,1.17703804347826,1.1517663043478255,1.1887907608695645,1.1864809782608692,1.1266983695652169,1.22493206521739,1.2721467391304333,1.2739130434782597,1.3058423913043469,1.2983695652173903,1.2199728260869556,1.2251358695652164,1.2858695652173897,1.2703124999999982,1.2192255434782593,1.2064538043478246,1.1491847826086943,1.1568614130434767,1.1336277173913032,1.13743206521739,1.140828804347825,1.2248641304347816,1.2766983695652159,1.27955163043478,1.298573369565215,1.39517663043478,1.4897418478260838,1.576154891304345,1.4624320652173883,1.3934782608695622,1.5128396739130396,1.5351222826086919,1.4871603260869528,1.5407608695652135,1.56854619565217,1.5419157608695615,1.5878396739130396,1.5208559782608655,1.5112092391304301,1.5491847826086909,1.63777173913043,1.6918478260869514,1.7225543478260814,1.5962635869565165,1.508491847826082,1.5366847826086907,1.6295516304347777,1.6667119565217343,1.6129755434782564,1.4521739130434743,1.4701086956521698,1.3415760869565176,1.3476222826086914,1.3854619565217348,1.4384510869565168,1.3191576086956476,1.3553668478260816,1.3404891304347772,1.3584239130434725,1.434986413043472,1.4484374999999938,1.402241847826081,1.5531929347826017,1.5404211956521667,1.6128396739130355,1.6008831521739049,1.7372961956521653,1.7360733695652095,1.6735733695652093,1.8193614130434694,1.8157608695652079,1.8105298913043388,1.916576086956513,1.8822010869565131,1.8344429347826003,1.8093070652173837,1.7480298913043402,1.7360733695652102,1.8828124999999922,1.76576086956521,1.7872282608695569,1.7330842391304266,1.7051630434782532,1.7540760869565135,1.8053668478260787,1.8133831521739048,1.9477581521739042,2.0277853260869474,2.1165081521739033,1.9776494565217302,1.9960597826086868,2.0932744565217294,2.2212635869565114,2.2850543478260765,2.10937499999999,2.0744565217391204,2.1354619565217288,2.1406249999999893,2.2817255434782497,2.260665760869554]},{"name":"Risk-free + Σ beta × factor (no alpha)","kind":"calculated","x":["2021-11-10","2021-11-22","2021-12-02","2021-12-14","2021-12-27","2022-01-06","2022-01-18","2022-01-28","2022-02-09","2022-02-18","2022-03-03","2022-03-15","2022-03-24","2022-04-05","2022-04-18","2022-04-28","2022-05-09","2022-05-19","2022-06-01","2022-06-10","2022-06-23","2022-07-06","2022-07-15","2022-07-27","2022-08-08","2022-08-18","2022-08-29","2022-09-09","2022-09-21","2022-09-30","2022-10-12","2022-10-24","2022-11-03","2022-11-14","2022-11-25","2022-12-07","2022-12-16","2022-12-29","2023-01-11","2023-01-23","2023-02-02","2023-02-14","2023-02-27","2023-03-08","2023-03-20","2023-03-30","2023-04-11","2023-04-21","2023-05-03","2023-05-15","2023-05-24","2023-06-06","2023-06-16","2023-06-28","2023-07-11","2023-07-21","2023-08-01","2023-08-11","2023-08-23","2023-09-05","2023-09-14","2023-09-26","2023-10-06","2023-10-17","2023-10-27","2023-11-08","2023-11-17","2023-11-30","2023-12-12","2023-12-22","2024-01-04","2024-01-17","2024-01-29","2024-02-07","2024-02-20","2024-03-01","2024-03-13","2024-03-22","2024-04-04","2024-04-16","2024-04-25","2024-05-07","2024-05-17","2024-05-29","2024-06-10","2024-06-21","2024-07-03","2024-07-15","2024-07-25","2024-08-06","2024-08-15","2024-08-27","2024-09-09","2024-09-19","2024-09-30","2024-10-10","2024-10-22","2024-10-31","2024-11-12","2024-11-22","2024-12-04","2024-12-16","2024-12-27","2025-01-10","2025-01-22","2025-02-03","2025-02-13","2025-02-25","2025-03-07","2025-03-19","2025-03-28","2025-04-09","2025-04-22","2025-05-02","2025-05-13","2025-05-23","2025-06-05","2025-06-16","2025-06-27","2025-07-10","2025-07-22","2025-07-31","2025-08-12","2025-08-22","2025-09-03","2025-09-15","2025-09-25","2025-10-06","2025-10-16","2025-10-28","2025-11-07","2025-11-18","2025-12-01","2025-12-11","2025-12-22","2026-01-05","2026-01-15","2026-01-28","2026-02-06","2026-02-19","2026-03-03","2026-03-12","2026-03-24","2026-04-06","2026-04-15","2026-04-27","2026-05-07","2026-05-19","2026-05-29","2026-06-10","2026-06-23","2026-07-02","2026-07-15","2026-07-27","2026-08-05","2026-08-17","2026-08-27","2026-09-09","2026-09-18","2026-09-30"],"y":[0.9882313539381324,0.9942494226190571,0.9667845840624678,0.975338005768935,1.0128737165195163,0.9723661132651786,0.9363349445828426,0.900979626250132,0.947192400712029,0.8827332209495455,0.8839086146371629,0.8525776078183667,0.9261183273914662,0.9306745047578401,0.8885643122740509,0.8613196034568896,0.7831719425538021,0.7626768797725174,0.8039248582046113,0.7584049801278409,0.7472447494099295,0.7592003963894327,0.7622440447728808,0.7946481780628355,0.8279258414398087,0.8574196637943347,0.8001900513072736,0.8142210947614474,0.7493692097586834,0.7058892417836777,0.7003460033324612,0.7461104420170522,0.7231639148438868,0.776346106552744,0.7907038780930677,0.7719222000347612,0.7558115879812455,0.7518487892326974,0.7785913741235096,0.7928186195193228,0.8300267324376839,0.8211396986143974,0.7860678192913008,0.7914865359607836,0.794497430120492,0.819681123109229,0.8328314606690902,0.8414819047222668,0.8360953621428755,0.8505558352312852,0.8444150773127789,0.8841925939820237,0.9165566179821246,0.9115005244770261,0.9232554508330331,0.9436181129637087,0.9500188369187113,0.9228526571632775,0.9232875364505041,0.9415431999809384,0.9449865078426166,0.8908014938162593,0.9031650481669504,0.9172861066049124,0.8564197592704405,0.9192232760891597,0.9466195773990871,0.9616628400221479,0.9746191386819283,0.9909539963297406,0.9771715315860993,0.9978658300268943,1.0407317269237097,1.0685887652018127,1.0605437696128237,1.1029216207723802,1.1119012555815775,1.1305831308163288,1.1077719577531588,1.091725234726621,1.084735469809947,1.1182495149240417,1.1468491886846675,1.1448345396056292,1.1692943321561948,1.200909643102129,1.221419879579594,1.2321663619481527,1.1562273614613332,1.125446364753366,1.2077118236633422,1.2216214229783107,1.18577519971853,1.2441764243867899,1.2610879139352527,1.2742507106289134,1.2886250178038594,1.2529398636121412,1.3211201632385667,1.3187303336931069,1.354273158890021,1.3570655262400424,1.3351466764877409,1.3037743657887124,1.3686511199578029,1.3475679097389577,1.3762657969295908,1.3320397504401709,1.2849056069099698,1.2581763694171655,1.2356097052502597,1.2135256790814626,1.1665990055863402,1.2720774351976079,1.325732473871505,1.3103306172810523,1.347616489637149,1.3729890826394735,1.4085638064581225,1.423850556018468,1.4341038523126721,1.4580319485843758,1.4814716984557914,1.473269355150356,1.4695418295182112,1.5227124054670553,1.518690626344606,1.5552172694770776,1.531464860680807,1.6011308916252638,1.5587173091453328,1.528899912770517,1.5746199973981223,1.5884382427672756,1.5873359396729234,1.5962508904417994,1.5940178956521762,1.6027869260635454,1.570044677902125,1.5513843684922894,1.5430003871334141,1.512247249132327,1.4714203499447496,1.4798674278464017,1.5877958488360928,1.6213307872768281,1.669869574009975,1.6824658380445812,1.7406879717871129,1.6475354046193393,1.6666987395894421,1.6952141326794419,1.720735870996626,1.6687976481746805,1.7576896890185865,1.7633236410402555,1.765751894122687,1.7417168859958303,1.7502192828633845,1.7568620585967065]}],"note":"The gap between the lines is the cumulated alpha and residual. Betas are estimated on the whole period (in-sample)."},{"id":"attribution","title":"Return attribution","type":"bar","x":{"label":"Component","type":"category"},"y":{"label":"Contribution to total return","unit":"percent"},"series":[{"name":"AAPL","kind":"calculated","x":["Risk-free","MKT","SMB","HML","Alpha","Residual"],"y":[0.2678552921195645,0.5614986099648173,0.09981048131548662,-0.08187621441826107,0.4784780100020199,-0.06510041811406922],"style":"bar"}]},{"id":"betas","title":"Factor loadings","type":"bar","x":{"label":"Factor","type":"category"},"y":{"label":"Beta"},"series":[{"name":"AAPL","kind":"calculated","x":["MKT","SMB","HML"],"y":[1.1169730020875381,-0.2403204327916219,-0.18297281016650674],"lower":[1.0044493096808302,-0.3462891390070092,-0.2768221967600507],"upper":[1.229496694494246,-0.13435172657623462,-0.0891234235729628],"style":"bar"}],"note":"Bars with 95% HAC confidence intervals."},{"id":"factor_paths","title":"Factor returns (growth of 1)","type":"line","x":{"label":"Date","type":"time"},"y":{"label":"Growth of 1"},"series":[{"name":"MKT","kind":"observed","x":["2021-11-10","2021-11-22","2021-12-02","2021-12-14","2021-12-27","2022-01-06","2022-01-18","2022-01-28","2022-02-09","2022-02-18","2022-03-03","2022-03-15","2022-03-24","2022-04-05","2022-04-18","2022-04-28","2022-05-09","2022-05-19","2022-06-01","2022-06-10","2022-06-23","2022-07-06","2022-07-15","2022-07-27","2022-08-08","2022-08-18","2022-08-29","2022-09-09","2022-09-21","2022-09-30","2022-10-12","2022-10-24","2022-11-03","2022-11-14","2022-11-25","2022-12-07","2022-12-16","2022-12-29","2023-01-11","2023-01-23","2023-02-02","2023-02-14","2023-02-27","2023-03-08","2023-03-20","2023-03-30","2023-04-11","2023-04-21","2023-05-03","2023-05-15","2023-05-24","2023-06-06","2023-06-16","2023-06-28","2023-07-11","2023-07-21","2023-08-01","2023-08-11","2023-08-23","2023-09-05","2023-09-14","2023-09-26","2023-10-06","2023-10-17","2023-10-27","2023-11-08","2023-11-17","2023-11-30","2023-12-12","2023-12-22","2024-01-04","2024-01-17","2024-01-29","2024-02-07","2024-02-20","2024-03-01","2024-03-13","2024-03-22","2024-04-04","2024-04-16","2024-04-25","2024-05-07","2024-05-17","2024-05-29","2024-06-10","2024-06-21","2024-07-03","2024-07-15","2024-07-25","2024-08-06","2024-08-15","2024-08-27","2024-09-09","2024-09-19","2024-09-30","2024-10-10","2024-10-22","2024-10-31","2024-11-12","2024-11-22","2024-12-04","2024-12-16","2024-12-27","2025-01-10","2025-01-22","2025-02-03","2025-02-13","2025-02-25","2025-03-07","2025-03-19","2025-03-28","2025-04-09","2025-04-22","2025-05-02","2025-05-13","2025-05-23","2025-06-05","2025-06-16","2025-06-27","2025-07-10","2025-07-22","2025-07-31","2025-08-12","2025-08-22","2025-09-03","2025-09-15","2025-09-25","2025-10-06","2025-10-16","2025-10-28","2025-11-07","2025-11-18","2025-12-01","2025-12-11","2025-12-22","2026-01-05","2026-01-15","2026-01-28","2026-02-06","2026-02-19","2026-03-03","2026-03-12","2026-03-24","2026-04-06","2026-04-15","2026-04-27","2026-05-07","2026-05-19","2026-05-29","2026-06-10","2026-06-23","2026-07-02","2026-07-15","2026-07-27","2026-08-05","2026-08-17","2026-08-27","2026-09-09","2026-09-18","2026-09-30"],"y":[0.9896,0.9915143847542408,0.9628332320637997,0.967796860167393,1.0015080660388713,0.976684404429406,0.9479056398241072,0.9123901765265341,0.9534803631558938,0.9038937520964583,0.9068781146543312,0.8805480035772345,0.940265306185727,0.9386173924541193,0.9088812795615205,0.8834611391338774,0.8176297407191696,0.8026787610064239,0.8431479198841244,0.8037015028785016,0.7816018434918147,0.792120653218127,0.796334069024679,0.8304748529805089,0.8599468800883202,0.8882627994637129,0.8358982009868228,0.8439590348811623,0.7865467158348775,0.7438171424180284,0.7436835642608252,0.7850146211453947,0.7701584494910758,0.8168606398670734,0.8284210977557082,0.8073817192786088,0.7899829521636337,0.7878844048514931,0.8136176532240349,0.8258743925787065,0.8608071473938141,0.8493972100538365,0.8186073255134845,0.8192872911976299,0.8046761471903019,0.8241479231425001,0.8347970493868264,0.838448054905009,0.8264095817228976,0.836516386052765,0.8335506726894515,0.8690264838355517,0.8924714748216288,0.8852255282074294,0.8983704077649766,0.9167491277282883,0.9246600336207941,0.8994908592849988,0.8911307850049133,0.9035310934937015,0.9028920489859683,0.8545878059771886,0.8604688232520774,0.8719416059273337,0.8173364823534862,0.8682420161371748,0.8947828379790469,0.9052660676407092,0.9207806279837198,0.9471664631643442,0.9298017540356884,0.9364682784531575,0.9739419100133332,0.9831220766920273,0.9813732799280918,1.011509114396598,1.014747565274004,1.0276991932217705,1.0102119730613206,0.9886863526736916,0.9878100684968001,1.0148639933895933,1.035780516430611,1.0254755173521182,1.039289712258436,1.055751237809107,1.069301574791477,1.0898117187975032,1.0465880536513308,1.0082105534878194,1.0662560797205587,1.0815020148458339,1.047585332845,1.0976926436374463,1.1042668332356582,1.1064627931688016,1.119256870154061,1.0930103304010361,1.1534744021652843,1.152232078195573,1.1748430468494293,1.1704913910901433,1.1447566190723046,1.1166400394756513,1.1673474337583731,1.1491139962035717,1.169544147020272,1.1313095071555623,1.0913118874011087,1.0739081782695041,1.0540243652158878,1.0282513510035145,0.9964715706428892,1.0720931210491986,1.1120879103434733,1.0936561846119046,1.1184550783217555,1.1349123626767612,1.1610837493206663,1.1819062161579836,1.1857530898971864,1.1899689730388643,1.209151939082486,1.2136454642959182,1.2097906049943745,1.2427707101539913,1.2389523154206645,1.2638053739429171,1.2423762142122625,1.2877707384088675,1.2545526680112387,1.2303760186273953,1.269091094703254,1.2873089842574912,1.2820005789600522,1.2842074545734878,1.2936588795367951,1.2949311319852417,1.2836071965158844,1.2693339085753295,1.258558536683298,1.2296756336022985,1.208365672921729,1.21843351415548,1.2925119730344026,1.3175812195537728,1.346039144582322,1.3437637597271466,1.3881209025594663,1.330255126708557,1.3478646778599301,1.3702863851461138,1.3840094691844778,1.351180180082199,1.4076543977259477,1.4116423023639468,1.4087852505073761,1.3885616317292497,1.3883593761996027,1.384636646656094]},{"name":"SMB","kind":"observed","x":["2021-11-10","2021-11-22","2021-12-02","2021-12-14","2021-12-27","2022-01-06","2022-01-18","2022-01-28","2022-02-09","2022-02-18","2022-03-03","2022-03-15","2022-03-24","2022-04-05","2022-04-18","2022-04-28","2022-05-09","2022-05-19","2022-06-01","2022-06-10","2022-06-23","2022-07-06","2022-07-15","2022-07-27","2022-08-08","2022-08-18","2022-08-29","2022-09-09","2022-09-21","2022-09-30","2022-10-12","2022-10-24","2022-11-03","2022-11-14","2022-11-25","2022-12-07","2022-12-16","2022-12-29","2023-01-11","2023-01-23","2023-02-02","2023-02-14","2023-02-27","2023-03-08","2023-03-20","2023-03-30","2023-04-11","2023-04-21","2023-05-03","2023-05-15","2023-05-24","2023-06-06","2023-06-16","2023-06-28","2023-07-11","2023-07-21","2023-08-01","2023-08-11","2023-08-23","2023-09-05","2023-09-14","2023-09-26","2023-10-06","2023-10-17","2023-10-27","2023-11-08","2023-11-17","2023-11-30","2023-12-12","2023-12-22","2024-01-04","2024-01-17","2024-01-29","2024-02-07","2024-02-20","2024-03-01","2024-03-13","2024-03-22","2024-04-04","2024-04-16","2024-04-25","2024-05-07","2024-05-17","2024-05-29","2024-06-10","2024-06-21","2024-07-03","2024-07-15","2024-07-25","2024-08-06","2024-08-15","2024-08-27","2024-09-09","2024-09-19","2024-09-30","2024-10-10","2024-10-22","2024-10-31","2024-11-12","2024-11-22","2024-12-04","2024-12-16","2024-12-27","2025-01-10","2025-01-22","2025-02-03","2025-02-13","2025-02-25","2025-03-07","2025-03-19","2025-03-28","2025-04-09","2025-04-22","2025-05-02","2025-05-13","2025-05-23","2025-06-05","2025-06-16","2025-06-27","2025-07-10","2025-07-22","2025-07-31","2025-08-12","2025-08-22","2025-09-03","2025-09-15","2025-09-25","2025-10-06","2025-10-16","2025-10-28","2025-11-07","2025-11-18","2025-12-01","2025-12-11","2025-12-22","2026-01-05","2026-01-15","2026-01-28","2026-02-06","2026-02-19","2026-03-03","2026-03-12","2026-03-24","2026-04-06","2026-04-15","2026-04-27","2026-05-07","2026-05-19","2026-05-29","2026-06-10","2026-06-23","2026-07-02","2026-07-15","2026-07-27","2026-08-05","2026-08-17","2026-08-27","2026-09-09","2026-09-18","2026-09-30"],"y":[0.9934,0.9725801650263469,0.9506453917558074,0.9251590807616256,0.9420025940128652,0.9211659701798117,0.8930548629745456,0.8700274986901423,0.8787036460692439,0.891972486441389,0.8990640459072904,0.8942217570563313,0.8903633605301298,0.8855420162184108,0.8739439358887402,0.868190637547825,0.85151705822594,0.8709371633028593,0.8617077845040427,0.8818604633591071,0.8818413038676061,0.8894208879948052,0.8949732035603435,0.9111102193918079,0.9460816486770038,0.9322478297523571,0.9169688683894416,0.9129260814907452,0.909138976909084,0.9102473184273722,0.9167416050703349,0.8895820104867005,0.9045722141561962,0.8981711600312203,0.8813214622500958,0.8829254537454698,0.8800662187194402,0.8738741325451644,0.8927987974850042,0.9106394827329667,0.9410294235862292,0.9140242317437564,0.9214714428104708,0.9189047235045383,0.8824169318471582,0.8716570106005637,0.8641764125694842,0.8627808423830354,0.8552641868360283,0.8595687463826424,0.8714715396888413,0.887722796135446,0.8784423694316279,0.8769642653832485,0.8838931248196741,0.884279512141954,0.8919675954956778,0.8780953617632695,0.8668648184621064,0.8587358541257356,0.8388916949226779,0.8356711365428316,0.8296867135086182,0.8191312449163473,0.8118034783870901,0.805206819241772,0.8130047607445547,0.8096161748179169,0.8271599648808852,0.863961412072864,0.8387604565872554,0.8233667286547817,0.8339107979944961,0.8027762962055295,0.8205058328571095,0.8148023174330413,0.7935418821369252,0.7857571884147215,0.7829585578897638,0.7719653683627435,0.7704394801848817,0.7903363408536029,0.7820878076063398,0.7742723003499508,0.7618444019025863,0.7472796456801146,0.744717563558088,0.780668187147036,0.8127802365559371,0.7848888721457056,0.7764179498383321,0.786086361620235,0.7658683082905725,0.7924105959457362,0.7797606179534928,0.7602126008772329,0.7684772371315423,0.7727307384911635,0.8040349700206265,0.8017266689156808,0.8083758028562044,0.8038885313933464,0.7826988332459436,0.7719013412291673,0.7731267535513184,0.7637054333694431,0.7630739676882284,0.7361330148178803,0.7241548659844248,0.7238300885954547,0.711906599958449,0.6984743986282296,0.7007275036828783,0.7079339441392948,0.7157860410714117,0.7071867165569583,0.7157265918075209,0.7114897532026249,0.7135509458778976,0.7348948353756428,0.7296144169042023,0.7128971057797394,0.7231610103322521,0.7407409024762015,0.7374629512812902,0.7323167918932744,0.7260142045436936,0.7332168116239004,0.7379336645941597,0.7301212701455392,0.7118674300218305,0.7064893514382931,0.7235785792841918,0.7423716731865762,0.7329601248322792,0.7201147937884858,0.7494570230939432,0.7397195975029671,0.7368027212771708,0.7382409460348829,0.7401059591553131,0.7274997637018545,0.7368324923956063,0.7429809745780417,0.748330247380708,0.7483952556645094,0.7393934267451264,0.7149704072861608,0.7301998637615185,0.7314898693385579,0.7371269610909633,0.752243574227982,0.7468136100518213,0.7444110886088636,0.7500050661067431,0.748383814545464,0.7475390134788178,0.7303580126861086,0.7231059050246629,0.719340435426561]},{"name":"HML","kind":"observed","x":["2021-11-10","2021-11-22","2021-12-02","2021-12-14","2021-12-27","2022-01-06","2022-01-18","2022-01-28","2022-02-09","2022-02-18","2022-03-03","2022-03-15","2022-03-24","2022-04-05","2022-04-18","2022-04-28","2022-05-09","2022-05-19","2022-06-01","2022-06-10","2022-06-23","2022-07-06","2022-07-15","2022-07-27","2022-08-08","2022-08-18","2022-08-29","2022-09-09","2022-09-21","2022-09-30","2022-10-12","2022-10-24","2022-11-03","2022-11-14","2022-11-25","2022-12-07","2022-12-16","2022-12-29","2023-01-11","2023-01-23","2023-02-02","2023-02-14","2023-02-27","2023-03-08","2023-03-20","2023-03-30","2023-04-11","2023-04-21","2023-05-03","2023-05-15","2023-05-24","2023-06-06","2023-06-16","2023-06-28","2023-07-11","2023-07-21","2023-08-01","2023-08-11","2023-08-23","2023-09-05","2023-09-14","2023-09-26","2023-10-06","2023-10-17","2023-10-27","2023-11-08","2023-11-17","2023-11-30","2023-12-12","2023-12-22","2024-01-04","2024-01-17","2024-01-29","2024-02-07","2024-02-20","2024-03-01","2024-03-13","2024-03-22","2024-04-04","2024-04-16","2024-04-25","2024-05-07","2024-05-17","2024-05-29","2024-06-10","2024-06-21","2024-07-03","2024-07-15","2024-07-25","2024-08-06","2024-08-15","2024-08-27","2024-09-09","2024-09-19","2024-09-30","2024-10-10","2024-10-22","2024-10-31","2024-11-12","2024-11-22","2024-12-04","2024-12-16","2024-12-27","2025-01-10","2025-01-22","2025-02-03","2025-02-13","2025-02-25","2025-03-07","2025-03-19","2025-03-28","2025-04-09","2025-04-22","2025-05-02","2025-05-13","2025-05-23","2025-06-05","2025-06-16","2025-06-27","2025-07-10","2025-07-22","2025-07-31","2025-08-12","2025-08-22","2025-09-03","2025-09-15","2025-09-25","2025-10-06","2025-10-16","2025-10-28","2025-11-07","2025-11-18","2025-12-01","2025-12-11","2025-12-22","2026-01-05","2026-01-15","2026-01-28","2026-02-06","2026-02-19","2026-03-03","2026-03-12","2026-03-24","2026-04-06","2026-04-15","2026-04-27","2026-05-07","2026-05-19","2026-05-29","2026-06-10","2026-06-23","2026-07-02","2026-07-15","2026-07-27","2026-08-05","2026-08-17","2026-08-27","2026-09-09","2026-09-18","2026-09-30"],"y":[1.0095,1.0150020073123762,1.018287356911893,1.0362738929066857,1.0128321879063076,1.1163195482629193,1.1885389446444317,1.199310111251302,1.1747153876029275,1.21907624201291,1.2194853148191738,1.2441523883383934,1.1856621575635424,1.1479563573217049,1.233700766778842,1.2377961274882734,1.3249533358415466,1.3234146857514661,1.3566484691727372,1.3478644131371667,1.2286903618132305,1.2052626716200663,1.2071205990985103,1.210925701939531,1.1415640760248802,1.1748882670259575,1.2116093898716354,1.179195405736284,1.2168295525135138,1.2015100145633686,1.2450550099764102,1.278248171936777,1.323368386239211,1.2994082246424137,1.3181617111292727,1.2889646929999075,1.2799520126607773,1.3185160737195867,1.2988874515652078,1.2645948389628183,1.2230892387391685,1.2522402377719384,1.2654271981941063,1.2378944142930464,1.1547101311420913,1.1544805022472273,1.1659494797623264,1.1434975165973784,1.1060072363323514,1.0868457474347175,1.0946327979945956,1.0799256597257052,1.0660007238663856,1.0551584854716893,1.073970944161819,1.0872586698404365,1.099805842963329,1.1207931981261348,1.082815543337685,1.0806386755761566,1.0956410313508878,1.0960292038567743,1.0788639453288238,1.1010375091629125,1.1012065993643474,1.1023518362636469,1.122226193097587,1.1210505257111356,1.1328000807679957,1.1707575070801133,1.1824657020813054,1.1380371929541877,1.1392924607780799,1.104961670011206,1.116229206958969,1.1017479846313796,1.1213987782045056,1.1285966222287283,1.1512859138336582,1.123010770484431,1.1679631439202804,1.1373138824940596,1.1473239156720225,1.112718048705672,1.1076684938763302,1.0898318280539734,1.0872568201221722,1.0999340690007984,1.16135197369982,1.1308009378125607,1.1051559713802537,1.1231994391787152,1.1346826621319879,1.11852176444108,1.1087347697562828,1.1055509158923968,1.1087861046818335,1.118230207650698,1.112731047611188,1.1296512464476587,1.095640024983579,1.0757174694438358,1.072349089547914,1.0772504668525118,1.0885813147388526,1.1023002410505658,1.1044187533801448,1.1382432577654842,1.144764437241134,1.1738848209980648,1.1900070059640098,1.1571146426872556,1.1881882473819723,1.1507053549494188,1.139316297123347,1.123839187197443,1.0973932335750962,1.100235181687676,1.1048276509439785,1.1257508307492192,1.1240566444057596,1.0897393902851344,1.089708611106492,1.122620144924656,1.1312095676522256,1.117079889971519,1.134044268016963,1.1180622655152677,1.0954960634116373,1.0933623427828918,1.1250447936361625,1.1292485171834543,1.1346639078460161,1.1507419852535181,1.153045015214479,1.1665567380416817,1.1760409890457872,1.1775324123268511,1.2606119586032911,1.2587617105647249,1.231844648082887,1.2249771484385967,1.2619708667005385,1.276362002416616,1.2373936948745634,1.2456852237510372,1.2352528709593584,1.2363960587233631,1.2267401611090853,1.2786238186721268,1.291036591936214,1.2723898690367503,1.2684824276515867,1.3111558250328965,1.2609135744786106,1.2694283789942695,1.2514120676806566,1.2781115421758404,1.2639276515231677,1.2307891786502234]}]}],"diagnostics":[{"name":"Breusch-Godfrey, AAPL","statistic":22.577015129644916,"pvalue":0.012420293180413234,"conclusion":"Rejects no serial correlation in the residuals at the 5% level: the HAC errors used here account for it.","passed":false},{"name":"Breusch-Pagan, AAPL","statistic":2.304790976381886,"pvalue":0.5116037044878876,"conclusion":"Fails to reject homoskedastic residuals at the 5% level (absence of evidence, not proof).","passed":true}],"assumptions":["Factors and the risk-free rate (one-month T-bill) are the daily series of the Kenneth R. French Data Library (US research factors, 2x3 sorts), in simple returns.","The library's factors are US factors: for a non-US asset, or one priced in another currency, the regression mixes currency and regional effects into alpha and betas.","Asset returns are simple returns on adjusted closes, in excess of the risk-free return, on the 1226 periods common to all assets and factors.","Standard errors: Newey-West HAC, Bartlett kernel, 6 lags (automatic: floor(4 (n/100)^(2/9))), small-sample correction.","Betas are constant over the sample (see the rolling betas for how far that holds). Alpha is in-sample and before trading costs; a significant alpha among many assets tested may be chance.","Daily data: assets that trade asynchronously with the US market (foreign listings, illiquid names) have betas biased towards zero; use weekly or monthly returns for them."],"warnings":["The sample ends on 2026-09-30, the last date published in the Kenneth French library (it is updated with a lag of several weeks)."],"methodology":"**Model.** For each asset $i$: $r_{it} - r_{ft} = \\alpha_i + \\sum_{k=1}^{L}\\beta_{ik} f_{kt} + \\varepsilon_{it}$, estimated by OLS on daily simple returns. CAPM: $f = (\\mathrm{MKT})$; Fama-French 3: $(\\mathrm{MKT}, \\mathrm{SMB}, \\mathrm{HML})$; Carhart: $+\\mathrm{MOM}$; Fama-French 5: $+(\\mathrm{RMW}, \\mathrm{CMA})$.\n\n**Inference.** Newey-West covariance $\\hat V = (X'X)^{-1}\\hat S(X'X)^{-1}$ with Bartlett weights and $L_{NW} = 6$ lags. Annualised alpha $= 252\\,\\hat\\alpha$. Appraisal ratio $= \\frac{252\\,\\hat\\alpha}{\\sqrt{252}\\,\\hat\\sigma_\\varepsilon}$, $\\hat\\sigma_\\varepsilon^2 = \\hat\\varepsilon'\\hat\\varepsilon/(T-L-1)$.\n\n**Attribution.** $r_{it} = r_{ft} + \\alpha_i + \\sum_k\\beta_{ik}f_{kt} + \\varepsilon_{it}$. With $W_{t-1} = \\prod_{s<t}(1+r_{is})$, the contribution of component $c$ is $\\sum_t W_{t-1}c_t$; the contributions sum to $W_T - 1$, the compounded total return.\n\n**GRS test.** $H_0:\\alpha_1=\\dots=\\alpha_N=0$. $\\mathrm{GRS} = \\frac{T}{N}\\,\\frac{T-N-L}{T-L-1}\\,\\frac{\\hat\\alpha'\\hat\\Sigma^{-1}\\hat\\alpha}{1+\\bar f'\\hat\\Omega^{-1}\\bar f} \\sim F_{N,\\,T-N-L}$, $\\hat\\Sigma = \\hat E'\\hat E/(T-L-1)$, $\\hat\\Omega$ the factor covariance with divisor $T$.\n\n**Factor data.** Kenneth R. French Data Library daily files (percent, converted to fractions).","provenance":{"data":[{"symbol":"AAPL","provider":"FMP","retrievedAt":"2026-11-20T23:35:56+00:00","start":"2021-10-29","end":"2026-11-20","observations":1271,"frequency":"1d","adjusted":"split_div","currency":null},{"symbol":"F-F_Research_Data_Factors_daily","provider":"Kenneth R. French Data Library (disk cache of the day)","retrievedAt":"2026-11-20T20:08:16+00:00","start":"2021-10-29","end":"2026-09-30","observations":1234,"frequency":"1d","adjusted":"none","currency":"USD","url":"https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/F-F_Research_Data_Factors_daily_CSV.zip"}],"spec":{"symbols":["AAPL"],"model":"ff3","factors":"auto","custom_factors":[],"custom_excess":true,"risk_free_symbol":"BIL","frequency":"daily","data_period":1260,"start":null,"end":null,"hac_lags":0,"confidence":0.95,"rolling_window":126,"factor_source":"french","factor_names":["MKT","SMB","HML"],"hac_lags_used":6,"french_files":[{"file":"F-F_Research_Data_Factors_daily_CSV.zip","url":"https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/F-F_Research_Data_Factors_daily_CSV.zip","retrievedAt":"2026-11-20T20:08:16+00:00","cached":true}]},"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:56+00:00","durationMs":2064,"reproduce":"import numpy as np, pandas as pd, statsmodels.api as sm\nimport io, zipfile, urllib.request\ndef french(name, cols):\n    req = urllib.request.Request(\"https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/\" + name, headers={\"User-Agent\": \"Mozilla/5.0\"})\n    z = zipfile.ZipFile(io.BytesIO(urllib.request.urlopen(req).read()))\n    rows = [l.split(\",\")[:len(cols) + 1] for l in z.read(z.namelist()[0]).decode(\"latin-1\").splitlines() if l[:8].isdigit()]\n    f = pd.DataFrame(rows, columns=[\"date\"] + cols).set_index(\"date\").astype(float) / 100\n    f.index = pd.to_datetime(f.index, format=\"%Y%m%d\"); return f\nff = french(\"F-F_Research_Data_Factors_daily_CSV.zip\", ['MKT', 'SMB', 'HML', 'RF'])\nr = pd.read_csv(\"closes.csv\", index_col=0, parse_dates=True)[\"AAPL\"].pct_change()  # adjusted closes\nd = pd.concat([r.rename(\"r\"), ff], axis=1, join=\"inner\").dropna().loc[\"2021-11-10\":]\nres = sm.OLS(d[\"r\"] - d[\"RF\"], sm.add_constant(d[['MKT', 'SMB', 'HML']])).fit(cov_type=\"HAC\", cov_kwds={\"maxlags\": 6, \"use_correction\": True}, use_t=True)\nprint(res.summary()); print(\"alpha, annualised:\", res.params[\"const\"] * 252)"}}}}2
Files main
Menu

Theme