Heteroscedastic ensemble deep RVFL model for high-frequency volatility forecasting and risk assessment.
Project description
A rich documentation is available in the GitHub repository.
heteroscedastic-edrvfl
Heteroscedastic ensemble deep random vector functional link neural network for high-frequency volatility forecasting and risk assessment.
heteroscedastic-edrvfl is a Python package for volatility forecasting using the HedRVFL model with multiple output layers.
HedRVFL combines randomized neural feature mapping, ensemble deep RVFL representations, heteroscedastic volatility information, and efficient regularized output-layer learning. This allows the model to capture nonlinear volatility dynamics with fast training.
Key Features
- HedRVFL Model: Implements a heteroscedastic ensemble deep RVFL model for high-frequency volatility forecasting and risk assessment.
- Multiple Output Layers: Uses layer-wise output readouts and aggregates predictions across hidden depths.
- Randomized Feature Learning: Uses randomly initialized hidden mappings with efficient output-layer training.
- Feature Selection: Includes feature-selection support to identify the most informative volatility predictors and reduce irrelevant input variables.
- Pruning Strategy: Uses pruning to remove weak or redundant hidden representations, improving model compactness and forecasting efficiency.
- Hyperparameter Tuning: Supports Hyperopt/TPE search for layer-wise model selection.
- Forecasting Metrics: Provides RMSE, MAE, NMAE, and Value-at-Risk helpers.
Installation
Downloading locally and installing:
git clone https://github.com/statsdl/heteroscedastic-edrvfl.git
cd heteroscedastic-edrvfl
Install dependencies:
pip install -r requirements.txt
Install the package:
pip install -e .
Using pip install from GitHub:
pip install git+https://github.com/statsdl/heteroscedastic-edrvfl.git
Using pip install from PyPI:
pip install heteroscedastic-edrvfl
Optional tuning installation:
pip install "heteroscedastic-edrvfl[tuning]"
Development installation:
pip install -e ".[dev]"
Usage
1. HedRVFLRegressor
from heteroscedastic_edrvfl import (
HedRVFLRegressor,
generate_synthetic_crypto_volatility,
make_supervised_frame,
)
frame = generate_synthetic_crypto_volatility(n_steps=1200, seed=0)
X, y = make_supervised_frame(frame)
model = HedRVFLRegressor(n_layers=3, random_state=0)
model.fit(X[:800], y[:800])
pred = model.predict(X[800:])
print("Volatility forecasts:", pred[:5])
2. Hyperopt/TPE tuning
from heteroscedastic_edrvfl import generate_synthetic_crypto_volatility, make_supervised_frame
from heteroscedastic_edrvfl.tuning import tune_hedrvfl
frame = generate_synthetic_crypto_volatility(n_steps=1200, seed=0)
X, y = make_supervised_frame(frame)
result = tune_hedrvfl(
X[:900],
y[:900],
n_layers=3,
max_evals=10,
random_state=0,
)
print("Best validation loss:", result.validation_loss)
print("Best parameters:", result.best_params)
The benchmark reports RMSE, MAE, NMAE, Value-at-Risk, tuning time, training time, testing time, and selected hyperparameters.
API Reference
HedRVFLRegressor
A heteroscedastic ensemble deep random vector functional link regressor for volatility forecasting.
Parameters
n_layers(int): Number of stacked randomized hidden layers.layer_params(list): Optional layer-wise parameter dictionaries.random_state(int): Random seed for reproducibility.aggregation(str): Prediction aggregation method, eithermedianormean.
Methods
fit(X, y): Fits the ensemble model.predict(X): Generates final volatility forecasts.predict(X, return_layers=True): Returns layer-wise predictions.
Tuning utilities
hedrvfl_search_space: Returns the default Hyperopt/TPE search space.tune_hedrvfl: Tunes HedRVFL hyperparameters.
Metrics
root_mean_squared_error: Computes RMSE.mean_absolute_error: Computes MAE.normalized_mean_absolute_error: Computes range-normalized MAE.value_at_risk: Computes normal Value-at-Risk from volatility forecasts.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Citation
If you use this package in your research, please cite:
@article{bhambu2025heteroscedastic,
title={Heteroscedastic ensemble deep random vector functional link neural network with multiple output layers for High Frequency Volatility Forecasting and Risk Assessment},
author={Bhambu, Aryan and Suganthan, Ponnuthurai Nagaratnam and Natarajan, Selvaraju},
journal={Neurocomputing},
volume={638},
pages={130078},
year={2025},
doi={10.1016/j.neucom.2025.130078}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file heteroscedastic_edrvfl-0.1.0.tar.gz.
File metadata
- Download URL: heteroscedastic_edrvfl-0.1.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5a707cda85b86e203df20036471f7690f3bdc28dc4211a2d5eee108861bf1aa
|
|
| MD5 |
11697d6ac78f7b2da38fa828b9e6c1c7
|
|
| BLAKE2b-256 |
0047cb8fdcea2147e5792cc6ba1a77382f97f008871f07c1e8d30de55666e195
|
Provenance
The following attestation bundles were made for heteroscedastic_edrvfl-0.1.0.tar.gz:
Publisher:
publish.yml on statsdl/heteroscedastic-edrvfl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
heteroscedastic_edrvfl-0.1.0.tar.gz -
Subject digest:
b5a707cda85b86e203df20036471f7690f3bdc28dc4211a2d5eee108861bf1aa - Sigstore transparency entry: 1957400604
- Sigstore integration time:
-
Permalink:
statsdl/heteroscedastic-edrvfl@27b9744fddb55ecb821f29aac45b4ead117591b8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/statsdl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@27b9744fddb55ecb821f29aac45b4ead117591b8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file heteroscedastic_edrvfl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: heteroscedastic_edrvfl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
221d6c02a88fb66385924948d5aca7f05a72b88031713697e2f8144853ed7e58
|
|
| MD5 |
2d99a93bc01a7a030f8176ad815525aa
|
|
| BLAKE2b-256 |
e43c6219b67e041954427dd05cec80c39d2d2bbf210845c9e5dfeccee61e28c1
|
Provenance
The following attestation bundles were made for heteroscedastic_edrvfl-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on statsdl/heteroscedastic-edrvfl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
heteroscedastic_edrvfl-0.1.0-py3-none-any.whl -
Subject digest:
221d6c02a88fb66385924948d5aca7f05a72b88031713697e2f8144853ed7e58 - Sigstore transparency entry: 1957400653
- Sigstore integration time:
-
Permalink:
statsdl/heteroscedastic-edrvfl@27b9744fddb55ecb821f29aac45b4ead117591b8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/statsdl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@27b9744fddb55ecb821f29aac45b4ead117591b8 -
Trigger Event:
release
-
Statement type: