Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version: v.1.2.0 #6

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

New version: v.1.2.0 #6

wants to merge 28 commits into from

Conversation

0xfdf
Copy link
Owner

@0xfdf 0xfdf commented Aug 11, 2024

Documentation improvements

  • fully documented the mathematical specification of the risk model in the docstring
  • also improved documentation on each style factor

New features

  • covariance estimation, with Ledoit-Wolf shrinkage and Short Term Factor Update
  • a complete config system for representing the exact set of settings for a risk model
  • toraniko.main.FactorModel, a new class that estimates the end-to-end factor model; including style scores, factor returns, rolling factor covariances and rolling asset covariances, driven by an input config file

API changes

Backwards compatibility with the previous version is maintained.

  • the column names (both expected and returned) are now configurable via arguments on all public functions
  • model._factor_returns has been graduated to a public function (maintained under semver rules), called model.factor_returns_cs

Performance enhancements

  • model.estimate_factor_returns now uses the Polars map_groups primitive, instead of iterating through the dates using a for loop. this significantly improved estimation speed: on a universe of 2000 assets estimated daily over 10 years, the total wall clock time went from ~64 seconds to ~44 seconds, on average, on a 2022 M1 MBP.

Project/maintenance improvements

  • issue templates for bug reports and feature requests have been made in the .github/ISSUE_TEMPLATE directory
  • added .__version__ to the root __init__ (should have been there from the start)
  • a show_versions() function has been added to root __init__ to help with diagnostics (credited Polars and @ritchie46 in the code, because it comes substantially from the Polars implementation)

0xfdf added 28 commits August 10, 2024 19:18
…out documentation on the methodology in the value factor
…comes down from 68 seconds to 52 seconds on an M1 mac
…r semver, but no backwards compat violations
commit to the first implementation of ledoit-wolf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant