Skip to main content

Feature - Volatility Forecasting GitHub last commit GitHub issues GitHub stars Python Version License

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, either median or mean.

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}
}

Metadata

Release files for heteroscedastic-edrvfl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for heteroscedastic-edrvfl 0.1.0
File Size Uploaded
heteroscedastic_edrvfl-0.1.0.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for heteroscedastic-edrvfl 0.1.0
File Interpreter ABI Platform
heteroscedastic_edrvfl-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / heteroscedastic_edrvfl-0.1.0.tar.gz

Download URL heteroscedastic_edrvfl-0.1.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b5a707cda85b86e203df20036471f7690f3bdc28dc4211a2d5eee108861bf1aa
BLAKE2b-256 checksum
How to use checksums
0047cb8fdcea2147e5792cc6ba1a77382f97f008871f07c1e8d30de55666e195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release files / heteroscedastic_edrvfl-0.1.0-py3-none-any.whl

Download URL heteroscedastic_edrvfl-0.1.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
221d6c02a88fb66385924948d5aca7f05a72b88031713697e2f8144853ed7e58
BLAKE2b-256 checksum
How to use checksums
e43c6219b67e041954427dd05cec80c39d2d2bbf210845c9e5dfeccee61e28c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page