Calculation contract
beta = sample_cov(benchmark, asset) / sample_var(benchmark)| Input | Allowed values | Meaning |
|---|---|---|
| asset | 3-250 decimal returns | Chronological raw asset returns |
| benchmark | Same length, nonconstant decimal returns | Aligned reference returns |
Method and interpretation
The default asset series is each benchmark return plus 0.005. Its slope is exactly one and its period intercept is 0.005. The intercept is a property of this invented relationship, not a demonstrated strategy premium.
A beta label is incomplete without the benchmark, sample dates, frequency and return definition. This fixture contains no real calendar or instrument identity. A real study must preserve them outside the array and ensure that each pair describes the same interval.
Where the reference stops
No risk-free series is deducted. Do not describe this raw intercept as CAPM alpha or interpret in-sample R-squared as investment quality. Nonlinear exposure, stale prices and changing factor sensitivities require a broader specification.
Published synthetic inputs
{
"asset": [
0.015,
-0.005,
0.025,
0.005
],
"benchmark": [
0.01,
-0.01,
0.02,
0
]
}Frozen calculation output
{
"slope": 1,
"intercept": 0.005,
"r_squared": 1,
"residual_sum_squares": 3.76158192263132e-36,
"observations": 4
}Descriptive same-period raw-return beta and intercept. No risk-free adjustment; intercept is not a causal alpha estimate.
Verification coverage
- Slope reconciled with covariance/variance and a known affine series.
- Zero benchmark variance and unequal lengths rejected.
Unit and independent-reference checks test arithmetic and rejection rules, not future investment performance.
Method references
Read the assumptions in context
Statistical estimationRegression fit is not forecast evidence
Separate least-squares estimation, conditional predictions and genuinely unseen forecast evaluation, including what a high fitted R-squared cannot establish.
Statistical estimationBeta depends on its window and benchmark
Interpret beta as an estimated slope with a specific return definition, benchmark and observation window, rather than a permanent label attached to an asset.