Skip to content

v2.0.0

Choose a tag to compare

@EM51641 EM51641 released this 18 May 18:52
· 14 commits to main since this release
a6067e7

Release Notes – v2.0.0

🚀 First Major Release: v2.0.0

We are excited to announce the first major release of VaRpy, a Python library for Value at Risk (VaR) and Conditional Value at Risk (CVaR) modeling using advanced statistical distributions and GARCH models.


What's New

  • Major Refactoring and Modernization

    • Complete overhaul of the codebase for improved organization, maintainability, and consistency.
    • All VaR models now use a unified, class-based architecture with a shared BaseVar interface.
    • Modular design with private helper methods for key computations and clear separation of concerns.
  • Standardized Model Structure

    • Each model (Normal, Student's t, EVT) follows a consistent interface:
      • Constructor only requires theta (confidence level) and horizon (forecast period).
      • .run() method processes return data and computes VaR/CVaR.
      • Consistent naming and comprehensive docstrings across all classes and methods.
  • Improved Type Hints and Documentation

    • Extensive use of modern Python type hints (numpy.typing) for clarity and static analysis.
    • All methods and classes are fully documented with clear parameter and return type information.
  • Enhanced Code Organization

    • Models are now located in varpy/var/models/ with consistent, lower-case file naming.
    • Project configuration and dependencies are managed via pyproject.toml (PEP 621), with legacy files (setup.py, setup.cfg, requirements.txt) removed for simplicity.
  • Flexible and Extensible Design

    • Adding new VaR models is straightforward: inherit from BaseVar, implement run(), and follow the established modular pattern.
    • Comprehensive contributing guidelines provided in the README.

Available Models

Model Description
Normal Assumes returns are normally distributed; GARCH(1,1) with Gaussian innovations
Student's t Heavy-tailed returns; GARCH(1,1) with Student's t innovations
EVT Extreme Value Theory; combines GARCH with Generalized Pareto Distribution for tail modeling