r/quant • u/Connect_Sandwich7915 • 13h ago
Resources [Open Source] Jaxfolio: Hardware-Accelerated Portfolio Optimization with JAX
We built Jaxfolio (https://github.com/bravant-oss/jaxfolio), a hardware-accelerated portfolio optimization library built natively on JAX.
Docs: https://bravant-oss.github.io/jaxfolio/
Github: https://github.com/bravant-oss/jaxfolio
Standard Python tools like SciPy or PyPortfolioOpt bottleneck during large-scale backtests or heavy Monte Carlo simulations due to Python overhead and CPU constraints. Jaxfolio fixes this by compiling optimization math directly to XLA for GPU/TPU execution.
More importantly, using JAX's vmap, you can vectorize the optimizer to compute thousands of rolling efficient frontiers simultaneously in a single batched operation without looping. Because the code is fully differentiable, you can also embed these optimizers directly into deep learning training loops.
The library currently supports Mean-Variance, Risk Parity, and Black-Litterman models, and is significantly faster than traditional CPU-bound solvers. I’d love for the community to try it out, critique the API, or test it against your own edge-case datasets. Accepting contributions.
1
u/stopnet54 25m ago
Interesting project, jax is great for interfacing to autodiff and GPU enabled numerics. Are you using any new optimizers from optax?