Class VolatilityForecaster
java.lang.Object
com.quantfinlib.ml.VolatilityForecaster
Machine Learning Risk Forecasting: predicts forward realized volatility from
a return series using gradient-boosted trees over engineered features
(multi-horizon realized vol, momentum, and shock magnitude), and maps the
forecast to an intuitive 0-100 risk score.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfit(double[] returns) Trains on a historical return series (needs at least ~3 months of data).doubleforecast(double[] returns) Forecast of next-horizon-period volatility (per-period units).doubleriskScore(double[] returns) Intelligent risk score in [0, 100]: the percentile of the forecast within the distribution of historically realized volatilities.static VolatilityForecasterweekly()
-
Constructor Details
-
VolatilityForecaster
public VolatilityForecaster(int horizon) - Parameters:
horizon- forward window (in periods) whose realized vol is predicted
-
-
Method Details
-
weekly
-
fit
Trains on a historical return series (needs at least ~3 months of data). -
forecast
public double forecast(double[] returns) Forecast of next-horizon-period volatility (per-period units). -
riskScore
public double riskScore(double[] returns) Intelligent risk score in [0, 100]: the percentile of the forecast within the distribution of historically realized volatilities.
-