Repository navigation
qis 5.37.0 adds supplied-covariance Gaussian portfolio risk analytics and includes the JOSS reviewer fixes for missing-price holdings, accounting alignment and paper clarity.
Added
-
Add supplied-covariance Gaussian Monte Carlo VaR through
GaussianVarSpec,
GaussianMonteCarloandcompute_gaussian_portfolio_risk. The benchmark-relative
snapshot reusesRiskModelfor volatility, beta and tracking error, with an independent
closed-form VaR control and explicit horizon units. Existing price-based VaR APIs are unchanged. -
Export the
qis.discrete_portfoliosubpackage inqis.__all__, soimport qisbinds it and
from qis import *includes it. Its names stay qualified asqis.discrete_portfolio.<name>
rather than wildcarded into the top-level namespace. Existing imports are unchanged.
Fixed
-
Apply prior-close weights in date order in
to_portfolio_returnson a shared, unique
DatetimeIndexwithoutNaT, preventing descending or shuffled rows from using a future
decision for an earlier return. Output row order, caller inputs and missing-term accounting
are unchanged. -
Reconstruct
PortfolioData.instrument_pnlon last observed marks
(prices.ffill().pct_change()), matching the backtester's convention from #189, so a
resumed quote books its full move to units held through the gap and instrument
contributions sum to the nav return. Complete price panels are unchanged. -
Keep
plot_barsgrouped Seaborn bars tied to their original series colours when an entire
series is missing, preventing surviving bars from disagreeing with the legend. Bar spacing,
short-palette cycling and explicit legend overrides are unchanged. MultiIndex columns
retain their established positional colour mapping after melting to outer-level labels. -
Retain long and short holdings at their last observed valuation mark when execution prices
are missing in the backtester (#189). Unquoted positions cannot trade, even to a zero target;
available targets use full marked NAV. NAV, effective weights, carry and instrument P&L now
follow the same marks, and skipped trades have zero costs. Warn on held stale marks, including
trailing gaps, and document explicit settlement/exit inputs for terminal events. -
Reject mismatched observation indexes in
fit_multivariate_olsbefore converting inputs
to positional arrays, preventing fits that silently pair different dates. Aligned fits,
finite-row filtering and prediction labels are unchanged. -
Align complete, uniquely named
instruments_carrypanels to price-column order in
backtest_model_portfolio, preventing one instrument's carry rate from being credited to
another. Carry timing and existing nonmatching-schema behavior are unchanged. -
Reject conflicting total-group labels in
get_group_dictand its grouped-panel and
portfolio-exposure callers, preventing a single group from silently replacing the
all-instrument total. Distinct total labels and grouping without a total are unchanged.
Changed
- Reduce peak memory in
bootstrap_price_datafor float64 list-output draws by replacing
sampled-return arrays with reconstructed price paths instead of retaining both collections.
Sampling, price reconstruction, output types and caller-owned inputs are unchanged. - Reduce peak memory in
estimate_rolling_ewma_covarby applying availability masks only
to returned rebalancing matrices instead of copying the full covariance history. Covariance
estimates, per-asset warm-up, dates and labels are unchanged; the estimator still retains its
full covariance tensor.
Documentation
- Clarify the JOSS paper's motivation, software comparisons and research impact, and describe
currency hedging, factor risk and stress testing in response to reviewer feedback. - Add a Gaussian VaR monitoring guide and an offline portfolio example.
- Refresh the public API, consumer-usage and paper audit records for the release.
Install from PyPI:
python -m pip install --upgrade qis==5.37.0The release includes the fix for #189. Runtime dependency requirements are unchanged from 5.36.1.