Skip to content

QCS Python changelog

0.7.3 (2025-09-08)

Improvements

  • Optimizer
    • Add scr to supported constraint_type
    • Add cost function in snapshot.optimize(): min_scr
    • Method check_portfolio_constraints supports subportfolio constraints
    • Allow use of np.nan in lieu of -1e9 in portfolio constraint for subportfolio ones
    • Turnover constraint at position level now defaults to relative calculation

0.7.2 (2025-03-06)

New features

  • Methods for logging in and out using auth0 through QCS web portal
    • Add qcs.login()
    • Add qcs.logout()
  • Update examples

0.7.1 (2025-01-31)

Improvements

  • Method top_factors from snapshot
    • Add replication_method (forward, backward, stepwise, enhanced_stepwise, adaptive_stepwise) and epsilon
    • Add trace (true/false) in order to output the full sequence of steps taken during replication

0.7.0 (2024-12-02)

Improvements

  • Improve documentation on https://qcs-python-docs.quarisma.net/
  • Improve error message when optimizer fails
  • Allow no local_db in Context
  • Update examples
  • Improve build and internal tools process

0.6.0 (2024-05-31)

New features

  • Methods for calculating returns
    • Add snapshot.get_historical_returns(context=context, window="1m")
    • Add snapshot.get_market_implied_returns(context=context, implied_perf_exponent=3)
  • Are constraints feasible
    • Add snapshot.are_constraints_feasible() method
  • Check portfolio constraints
    • constraints_met, breached_constraints = snapshot.check_portfolio_constraints(portfolio_constraints, context)
  • Efficient frontier
    • Add snapshot.efficient_frontier() method
  • Top factors and multiregression beta indicator
    • Add snapshot.top_factors() method
    • Add example_multiregression_beta.py

Improvements

  • Various refactoring and improvements

0.5.0 (2024-03-25)

New features

  • Constraints builder
    • Add PositionConstraint class with 3 parameters:
      • type: Literal["lock", "unlock", "long_only", "long_short", "short_only", "turnover"]
      • filter: function
      • value - used only for type=turnover
    • Add snapshot.apply_position_constraints() method

0.4.0 (2024-03-13)

New features

  • Add snapshot.get_covariance() for covariance analysis
    • Support for rectangular covariance as well
  • Add robust mean variance optimizer
    • Add more cost functions and inputs in snapshot.optimize(): min_tracking_error, robust_mean_variance, markowitz, risk_parity, min_variance, max_diversification
    • Position class now supports properties: locked, turnover, long_short, expected_return
    • Improved validation errors
    • Added basic support for optimizer_constraints List input.
    • Supported constraint_type : std, std=, std.bm, var, cvar, mdd, cmdd, turnover, min_return
    • Added an example file example_optimize_robust_mean_variance.py
  • Add Black-Litterman returns
    • Add snapshot.bl_returns() method
    • Positions in snapshot can now be given as size or allocation. This works everywhere (risk analysis, optimizer etc.).
      • Error is thrown if snapshot contains some positions with size and some with allocation
    • AllocationSnapshot now has new properties:
      • reference_market which must be another AllocationSnapshot. Currency must be identical to AllocationSnapshot.
      • pricing_context which can contain risk_aversion or risk_free_rate.
    • Updated examples/example_black_litterman_returns.py
  • Add asset, history and snapshot import helpers
    • qcs.import_assets_from_csv()
    • qcs.import_histories_from_csv()
    • qcs.import_snapshot_from_csv()
    • Use these helpers in examples

Improvements

  • Throw error when importing unsorted histories
  • Various refactoring

0.3.0 (2024-01-29)

Improvements

  • Use compressed history format in requests
  • Use RTNEW with custom pricer formulas when sending request