py-beacon-kit 0.4.0__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/CHANGELOG.md +66 -1
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/PKG-INFO +147 -35
- py_beacon_kit-0.6.0/README.md +263 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/pyproject.toml +5 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/__init__.py +1 -1
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/__init__.py +60 -0
- py_beacon_kit-0.6.0/src/beacon/backtest/accounting.py +517 -0
- py_beacon_kit-0.6.0/src/beacon/backtest/books.py +130 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/capacity.py +21 -4
- py_beacon_kit-0.6.0/src/beacon/backtest/dealing.py +284 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/engine.py +73 -226
- py_beacon_kit-0.6.0/src/beacon/backtest/etf.py +286 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/execution.py +5 -2
- py_beacon_kit-0.6.0/src/beacon/backtest/flows.py +377 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/implementation.py +66 -69
- py_beacon_kit-0.6.0/src/beacon/backtest/limits.py +147 -0
- py_beacon_kit-0.6.0/src/beacon/backtest/listings.py +129 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/main.py +74 -10
- py_beacon_kit-0.6.0/src/beacon/backtest/metrics.py +469 -0
- py_beacon_kit-0.6.0/src/beacon/backtest/presets.py +150 -0
- py_beacon_kit-0.6.0/src/beacon/backtest/redistribution.py +69 -0
- py_beacon_kit-0.6.0/src/beacon/backtest/result.py +319 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/screens.py +18 -0
- py_beacon_kit-0.6.0/src/beacon/backtest/settings.py +76 -0
- py_beacon_kit-0.6.0/src/beacon/backtest/vehicle.py +79 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/catalogue.py +54 -2
- py_beacon_kit-0.6.0/src/beacon/fund/__init__.py +19 -0
- py_beacon_kit-0.6.0/src/beacon/fund/fund.py +209 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/optimise/solver.py +24 -1
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/plot/__init__.py +4 -0
- py_beacon_kit-0.6.0/src/beacon/plot/accessors.py +486 -0
- py_beacon_kit-0.6.0/src/beacon/plot/analysis_charts.py +254 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/plot/comparison.py +31 -47
- py_beacon_kit-0.6.0/src/beacon/plot/drawing.py +130 -0
- py_beacon_kit-0.6.0/src/beacon/plot/fonts/InterTight-Light.ttf +0 -0
- py_beacon_kit-0.6.0/src/beacon/plot/fonts/InterTight-LightItalic.ttf +0 -0
- py_beacon_kit-0.6.0/src/beacon/plot/fonts/InterTight-Regular.ttf +0 -0
- py_beacon_kit-0.6.0/src/beacon/plot/fonts/OFL-InterTight.txt +93 -0
- py_beacon_kit-0.6.0/src/beacon/plot/fonts/OFL-SourceSerif4.txt +93 -0
- py_beacon_kit-0.6.0/src/beacon/plot/fonts/SourceSerif4-Italic350.ttf +0 -0
- py_beacon_kit-0.6.0/src/beacon/plot/frame.py +475 -0
- py_beacon_kit-0.6.0/src/beacon/plot/legend.py +154 -0
- py_beacon_kit-0.6.0/src/beacon/plot/mark.py +103 -0
- py_beacon_kit-0.6.0/src/beacon/plot/scales.py +191 -0
- py_beacon_kit-0.6.0/src/beacon/plot/style.py +381 -0
- py_beacon_kit-0.6.0/src/beacon/plot/themes.py +174 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/portfolio/cash_flows.py +10 -2
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/app.py +3 -1
- py_beacon_kit-0.6.0/src/beacon/server/backtest_options.py +178 -0
- py_beacon_kit-0.6.0/src/beacon/server/backtest_settings.py +500 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/backtests.py +122 -32
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/__init__.py +2 -0
- py_beacon_kit-0.6.0/src/beacon/server/routers/backtest.py +39 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/beacon.py +47 -2
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/schemas.py +416 -20
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/types.py +6 -3
- py_beacon_kit-0.6.0/src/beacon/strategy/__init__.py +58 -0
- py_beacon_kit-0.6.0/src/beacon/strategy/active.py +516 -0
- py_beacon_kit-0.6.0/src/beacon/strategy/base.py +74 -0
- py_beacon_kit-0.6.0/src/beacon/strategy/constraints.py +327 -0
- py_beacon_kit-0.6.0/src/beacon/strategy/signals.py +182 -0
- py_beacon_kit-0.6.0/src/beacon/strategy/tracking.py +354 -0
- py_beacon_kit-0.6.0/tests/baseline/test_annual_returns_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_annual_returns_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_compare_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_compare_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_constituents_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_constituents_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_contributions_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_contributions_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_correlation_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_correlation_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_exposures_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_exposures_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_frontier_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_frontier_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_level_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_level_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_performance_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_performance_light.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_weights_dark.png +0 -0
- py_beacon_kit-0.6.0/tests/baseline/test_weights_light.png +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_api_contract.py +21 -8
- py_beacon_kit-0.6.0/tests/test_backtest_dealing.py +230 -0
- py_beacon_kit-0.6.0/tests/test_backtest_etf.py +231 -0
- py_beacon_kit-0.6.0/tests/test_backtest_flows.py +338 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_catalogue.py +29 -1
- py_beacon_kit-0.6.0/tests/test_fund_record.py +130 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_plot.py +110 -28
- py_beacon_kit-0.6.0/tests/test_plot_frame.py +356 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_plot_images.py +7 -2
- py_beacon_kit-0.6.0/tests/test_readme.py +91 -0
- py_beacon_kit-0.6.0/tests/test_server_backtest_settings.py +245 -0
- py_beacon_kit-0.6.0/tests/test_strategy_active.py +248 -0
- py_beacon_kit-0.6.0/tests/test_strategy_tracking.py +242 -0
- py_beacon_kit-0.4.0/README.md +0 -152
- py_beacon_kit-0.4.0/src/beacon/backtest/result.py +0 -606
- py_beacon_kit-0.4.0/src/beacon/fund/__init__.py +0 -17
- py_beacon_kit-0.4.0/src/beacon/fund/base.py +0 -307
- py_beacon_kit-0.4.0/src/beacon/fund/etf.py +0 -182
- py_beacon_kit-0.4.0/src/beacon/plot/accessors.py +0 -541
- py_beacon_kit-0.4.0/src/beacon/plot/style.py +0 -251
- py_beacon_kit-0.4.0/tests/baseline/test_annual_returns_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_annual_returns_light.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_compare_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_compare_light.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_contributions_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_contributions_light.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_correlation_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_correlation_light.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_exposures_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_exposures_light.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_frontier_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_frontier_light.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_level_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_level_light.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_performance_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_performance_light.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_weights_dark.png +0 -0
- py_beacon_kit-0.4.0/tests/baseline/test_weights_light.png +0 -0
- py_beacon_kit-0.4.0/tests/test_etf_tracking.py +0 -145
- py_beacon_kit-0.4.0/tests/test_fund.py +0 -525
- py_beacon_kit-0.4.0/tests/test_readme.py +0 -47
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/.gitignore +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/LICENSE.txt +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/01_index_and_backtest.ipynb +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/02_backtest_analysis.ipynb +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/03_index_futures.ipynb +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/04_optimised_index.ipynb +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/05_optimised_backtest.ipynb +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/README.md +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/data/templates/equities_corp_actions_data.xlsx +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/data/templates/equities_fundamental_data.xlsx +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/data/templates/equities_market_data.xlsx +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/data/templates/equities_reference_data.xlsx +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/examples/data/templates/fx_rates_data.xlsx +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/_optional.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/analysis/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/analysis/attribution.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/analysis/concentration.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/analysis/etf/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/analysis/etf/analytics.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/analysis/liquidity.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/analysis/relative.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/analysis/risk.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/asset/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/asset/base.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/asset/bond.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/asset/commodity.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/asset/equity.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/asset/view.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/assumptions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/asset_view.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/costs.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/dividends.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/pricing.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/backtest/rules.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/changelog.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/adjustment.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/base.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/corporate_actions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/features.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/fetcher.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/free_float.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/fx.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/identifiers.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/importing.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/ingest.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/layout.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/loader.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/postgres.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/prices.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/session.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/data/store.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/derivatives/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/derivatives/base.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/derivatives/curves.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/derivatives/forwards.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/derivatives/futures.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/derivatives/pricing.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/derivatives/swaps.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/derivatives/term_structure.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/environment/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/environment/config.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/exceptions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/expressions/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/expressions/catalogue.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/expressions/core.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/expressions/namespaces.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/expressions/resolve.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/expressions/stubs.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/expressions/validation.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/asset_view.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/cache.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/calculation/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/calculation/calculator.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/calculation/corporate_actions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/calculation/deletions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/calculation/market_values.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/calculation/price_gaps.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/calculation/selection.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/calculation/total_return.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/capping.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/chaining.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/constructor.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/context.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/derived.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/expression_rules.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/feature_rules.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/methodology.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/requirements.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/result.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/index/schedule.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/optimise/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/optimise/config.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/optimise/constraints.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/optimise/frontier.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/optimise/result.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/plot/base.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/portfolio/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/portfolio/asset_view.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/portfolio/base.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/portfolio/history.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/portfolio/reporting.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/py.typed +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/report/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/report/blocks.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/report/pdf.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/risk/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/risk/contribution.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/risk/covariance.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/risk/factors.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/risk/model.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/__main__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/active_data.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/benchmarks.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/config.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/constraints.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/data_stores.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/definitions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/derivatives.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/documents.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/errors.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/jobs.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/market_caps.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/methods.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/optimisation.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/preview.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/reference.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/reports.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/risk.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/coverage.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/data.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/derivatives.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/importing.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/indices.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/jobs.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/optimise.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/refresh.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/reports.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/risk.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/stores.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/synthetic.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/universes.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/routers/watchlists.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/runs.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/security.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/serialisation.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/store.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/store_schemas.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/views.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/server/weights.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/sources.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/__main__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/dataset.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/extend.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/features.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/fx.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/listings.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/prices.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/profiles.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/regimes.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/regions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/returns.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/state.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/synthetic/universe.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/testing/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/testing/dataset.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/testing/weights.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/tokens/__init__.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/tokens/colors.json +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/src/beacon/universe.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/conftest.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/docstyle.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_adjustment.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_asset.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_asset_view.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_attribution.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_capacity.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_dividends.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_engine.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_engine_integration.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_execution.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_fills.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_main.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_modifier.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_pricing.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_result.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_backtest_stages.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_benchmark.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_book_currency.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_canonical_dataset_integration.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_capping.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_chaining.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_changelog.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_concentration.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_constraint_catalogue.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_corporate_action_kind.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_corporate_actions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_coverage_fields.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_currency_conversion.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_daily_weights.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_data_fetcher.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_data_import.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_data_store.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_data_tables.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_derivatives_base.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_derivatives_curves.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_derivatives_etf_future.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_derivatives_futures.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_derivatives_pricing.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_derivatives_swaps.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_derived_index.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_docs_examples.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_docs_style.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_effective_lag.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_examples.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_expression_namespaces.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_expression_rules.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_expression_schema.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_expression_validation.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_expressions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_factors.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_feature_rules.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_features.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_free_float_backfill.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_frontier.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_fx_data.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_fx_pairs.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_fx_routes.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_identifier_search.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_asset_view.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_batch_reads.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_cache.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_calculator.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_calculator_integration.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_currency.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_definition.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_eligibility.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_result.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_schedule.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_selection.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_index_weighting.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_ingest.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_integration.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_job_persistence.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_look_ahead.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_modelling_assumptions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_optimise.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_optional_dependencies.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_portfolio.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_portfolio_asset_view.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_postgres_store.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_properties.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_read_volume.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_reference_currency.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_reference_dimensions.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_reference_profile.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_report.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_reporting.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_requirements.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_risk_contribution.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_risk_model.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_backtest.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_cors.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_data_router.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_data_stores.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_derivatives.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_document_faults.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_features.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_import.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_indices.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_jobs.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_listing_discovery.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_optimise.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_optimised_indices.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_preview.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_preview_caps.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_preview_document.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_preview_optimised.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_reference_batch.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_refresh.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_reports.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_risk.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_store.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_synthetic.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_universes.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_views.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_server_weights_rows.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_session_agreement.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_spec_conformance.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_splits.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_stale_prices.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_survivorship.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_synthetic.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_synthetic_extend.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_synthetic_features.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_testing_dataset.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_tokens.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_total_return.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_universe_batch_reads.py +0 -0
- {py_beacon_kit-0.4.0 → py_beacon_kit-0.6.0}/tests/test_universe_filters.py +0 -0
|
@@ -8,6 +8,69 @@ Before 1.0, a breaking change raises the middle number, as in 0.1 to 0.2.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.6.0] - 2026-10-10
|
|
12
|
+
|
|
13
|
+
Charts: every chart framed as Beacon desktop frames it, with the beta mark, a heading and legend, and a notes line; six themes, including GitHub's dark page and transparent backgrounds; a constituents chart; axes that end on their ticks; and readable, consistently sized text. `IndexFund` and `ETF`, deprecated in 0.5.0, are removed.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Charts that create their own figure are framed as Beacon desktop frames them: the beta mark, then a thin accent bar beside a title in Inter Tight and a subtitle in Source Serif 4 italic; the legend, when there is one, at the right of the heading; and one italic notes line saying where the data came from and the dates it covers. Every chart method and `compare` takes `title=`, `subtitle=` and `notes=` to replace them, or an empty string to leave one out, and `beacon.plot.frame_text(ax, part)` reads them back. The fonts ship with py-beacon under the SIL Open Font License.
|
|
18
|
+
- Themes: `beacon.plot.use()` takes `beacon-light` (or `light`), `beacon-dark` (or `dark`), `github-dark`, `white`, `transparent-dark-axes` and `transparent-light-axes`, each also a matplotlib style, and `palette()` takes a theme. A chart keeps the theme it was drawn in, so its own colours follow it on a transparent background.
|
|
19
|
+
- `constituents()` on an index or a backtest result: the index drawn over its constituents' closes, all rebased to 100, each named at the end of its line. It draws the eight largest by weight unless given another `limit`, and the notes say how many it left out. The quickstart's first chart now uses it.
|
|
20
|
+
- `correlation(shading="blended")` blends the heatmap's colours from cell to cell; `"squares"` is the default.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Charts are designed 6in wide and drawn at 80% of their size, with fixed text sizes: 8pt axis titles, 7.8pt tick labels, 5.5pt legends and labels on lines, and 4.5pt notes, all in the title's colour. The time series are 3:2. Date axes label the year at each January and the month between, and a chart's side margins widen to fit its labels.
|
|
25
|
+
- Every axis that measures something ends on its outermost ticks, and where both axes measure, the lowest y label is left blank so it does not sit on the first x label.
|
|
26
|
+
- The level charts (`level`, `constituents`, `performance` and `compare`) have no gridlines and draw one line at 100. The bar charts and the frontier have no gridlines either, with a line at zero where a bar can fall below it. Ticks point inwards, and the axes are thinner and in the title's colour.
|
|
27
|
+
- The frontier's x axis is labelled, and its tangency point is a deep blue rather than orange. The correlation heatmap has no tick marks, and its colour bar is labelled at each end.
|
|
28
|
+
- `compare` no longer prints a metrics table under the chart. Its notes say how many shared observations the comparison rests on.
|
|
29
|
+
- A chart's notes, and the `"At ..."` date on a weights chart, moved from the axes to the figure's notes line. Read them with `frame_text(ax, "notes")` rather than `ax.texts`. A chart drawn into axes you pass with `ax=` keeps its notes and legend in the axes.
|
|
30
|
+
|
|
31
|
+
### Deprecated
|
|
32
|
+
|
|
33
|
+
- `beacon.plot.use()`, `palette()` and `style_dict()` name their parameter `theme`; `mode=` still works, with a `DeprecationWarning`, and a call by position is unchanged.
|
|
34
|
+
|
|
35
|
+
### Removed
|
|
36
|
+
|
|
37
|
+
- `beacon.fund.IndexFund` and `beacon.fund.ETF`, as their deprecation in 0.5.0 said. Use a `Fund` with a vehicle: an open-ended preset such as `uk_oeic()` for an `IndexFund`, or `ucits_etf()` or `us_etf()` for an `ETF`.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- A dark chart saved after switching back to the light style was saved on the light background. A saved chart now keeps its own background.
|
|
42
|
+
- The last value marked at the end of a level chart's line was cut off at the right edge, and its dot was cut in half where the axis ends.
|
|
43
|
+
- The drawdown axis rounded a 2.5% step to whole percents, labelling -2.5% as -2% and -7.5% as -8%.
|
|
44
|
+
|
|
45
|
+
## [0.5.0] - 2026-10-08
|
|
46
|
+
|
|
47
|
+
Funds and strategies: money flowing in and out with units and fund accounting; fund vehicles with structure presets, four pricing methods, UCITS and 1940 Act limits, and ETFs with a modelled market price; a `Fund` product record; index tracking through optimised or sampled replication; active strategies built from a signal; and all of it through the server's backtest API. `IndexFund` and `ETF` are deprecated.
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- Flows in a backtest: `Backtest(flows=...)` takes money in and pays it out, as `DatedFlows`, `PeriodicFlows` (an amount or a share of the assets), `RandomFlows` (seeded) or `PerformanceChasingFlows`, or several added together. Flows create and cancel units at the day's NAV per unit, so `nav_per_unit` measures performance whatever money moved, and with flows every return metric is a unit's and the summary adds `money_weighted_return`. The result records each flow in `flows`, and `aum` and `units_outstanding` each day. Without flows every figure is unchanged.
|
|
52
|
+
- `Implementation(cash_buffer=...)` keeps a share of the book in cash, which outflows draw on first, and `invest_flows` says whether an inflow buys the last rebalance's weights (the default) or the holdings pro rata.
|
|
53
|
+
- `Vehicle`: what the fund itself charges and its unit price at launch. `Vehicle(management_fee_bps=...)` accrues the fee daily on net assets (ACT/365) as a liability the NAV is net of, paid from cash as it can be.
|
|
54
|
+
- Pricing methods for a fund's dealing, so the investors who come or go can pay for the trading they cause: `SinglePricing` (the default), `DualPricing`, `SwingPricing` (full, or partial above a threshold) and `DilutionLevy`. A swing factor, spread or levy left unset is estimated from the run's own costs. Each flow records its `dealing_price` and the `adjustment` paid into the fund.
|
|
55
|
+
- Diversification limits for a fund structure, applied with the capacity caps: `UcitsLimits` (5/10/40, or 20/35 for an index tracker) and `Act1940Limits` (the 1940 Act's diversified-fund test).
|
|
56
|
+
- `OwnershipCap(free_float=False)` measures against every share outstanding rather than the free float.
|
|
57
|
+
- Structure presets: `uk_oeic`, `luxembourg_sicav`, `irish_icav` and `us_mutual_fund`, each a `Vehicle` with its structure's usual pricing and limits, any setting of which can be changed. `preset(name)` and `PRESETS` list them.
|
|
58
|
+
- Exchange-traded funds: `EtfVehicle`, and the `ucits_etf` (cash creations) and `us_etf` (in kind) presets. Flows are rounded to whole creation units, with the rest carried to the next day; in-kind creations move the holdings without cost, and cash ones pay a creation fee into the fund. After each close the shares are quoted on an exchange by `EtfMarket`: a premium that persists, follows creations and the NAV's return, and stays inside the arbitrage band, and a spread that follows the basket's trading cost and the NAV's volatility. `result.market` holds each day's quote and the summary adds the exchange investor's return and the average premium and spread.
|
|
59
|
+
- `Fund`: a fund product, with a name, a currency, `ShareClass`es and documents, one strategy and one vehicle. `fund.backtest(share_class=...)` runs a `Backtest` of it with that class's fee and distribution policy (accumulating or distributing).
|
|
60
|
+
- Strategies: `IndexTracking(index, replication=...)` holds an index in full, through an optimised subset (`OptimisedReplication`: the optimiser minimises tracking error within a holdings limit, using a covariance re-estimated at each rebalance from a year of returns, shrunk toward constant correlation), or through a stratified sample (`SampledReplication`: the largest names in each sector and size cell, each cell at its index weight). The run is measured against the index, and `result.replication` records each rebalance's weights, holdings and ex-ante tracking error. Pass it to `Backtest.run` or as a `Fund`'s strategy.
|
|
61
|
+
- Active strategies: `ActiveStrategy(benchmark, signal, construction, constraints)` builds its own portfolio at each rebalance and is measured against its benchmark. Signals: `FieldSignal`, `Momentum` and `FunctionSignal`, standardised into scores. Constructions: `MaxAlpha` (the most exposure to the scores within a tracking-error budget) and `MeanVariance` (expected active return against active variance), behind one `Construction` interface. Constraints relative to the benchmark: `TrackingErrorBudget`, `ActiveShare`, `RelativeSectorBounds`, `RelativePositionBounds`, `HoldingsLimit` and `TurnoverLimit`. `result.active` records each rebalance; the summary adds the information ratio, average active share and ex-ante tracking error; `active_attribution()` splits the active return by name.
|
|
62
|
+
- `BacktestResult.information_ratio()` for any run that tracks an index.
|
|
63
|
+
- The backtest API carries every part of a backtest: `POST /beacon/{index_id}/backtest` takes optional `strategy` (index tracking with a replication, or an active strategy), `implementation`, `flows`, `vehicle` (a preset with settings laid over it), `modelling_assumptions`, `dividends` and `currency`. A request without them runs as before. `GET /backtest/options` lists every type and field with units and bounds, the presets with their settings and the engine's default assumptions; `POST /beacon/{index_id}/backtest/validate` answers what would run, or findings at each field's path. The result adds the resolved `settings`, NAV per unit, units, flows, an ETF's quotes, replication and active records, the implementation's stages and unfilled orders, and saved-run rows add the strategy, vehicle, preset and currency.
|
|
64
|
+
- Field descriptions in `/backtest/options`, `/indices/rule-types` and `/optimise/constraint-types` carry a `unit` (such as `fraction`, `bps` or `money`) and `minimum` and `maximum` bounds, so a form can format a value and refuse one out of range.
|
|
65
|
+
|
|
66
|
+
### Deprecated
|
|
67
|
+
|
|
68
|
+
- `IndexFund` and `ETF`, to be removed in 0.6.0. Use a `Fund` with a vehicle: an open-ended preset such as `uk_oeic()` for an `IndexFund`, or `ucits_etf()` or `us_etf()` for an `ETF`. Until then they keep their own fee convention (a fee per trading day, applied to the backtest's NAV afterwards).
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- An optimisation with a holdings limit re-solves the kept names from the first answer, with the dropped names at zero, rather than from its original starting point. From there the solver could stop on weights that were not fully invested and refuse a problem it could solve. Optimised indices, optimised replication and active strategies with a holdings limit can solve to slightly different weights.
|
|
73
|
+
|
|
11
74
|
## [0.4.0] - 2026-10-02
|
|
12
75
|
|
|
13
76
|
A backtest can now model how a fund carries out its index at its size: screens, capacity caps, market impact and execution limits, dividends, and its modelling assumptions in one object. Results change: a backtest receives dividends, sizes its buys net of costs, and keeps its book in the index's currency. `ExpressionScreen` moved to `beacon.backtest`.
|
|
@@ -169,7 +232,9 @@ The first release.
|
|
|
169
232
|
- An index or backtest never uses a price, rate or free float dated after the day it is working on.
|
|
170
233
|
- Requires Python 3.11 or later.
|
|
171
234
|
|
|
172
|
-
[Unreleased]: https://github.com/karanbh01/py-beacon/compare/v0.
|
|
235
|
+
[Unreleased]: https://github.com/karanbh01/py-beacon/compare/v0.6.0...HEAD
|
|
236
|
+
[0.6.0]: https://github.com/karanbh01/py-beacon/compare/v0.5.0...v0.6.0
|
|
237
|
+
[0.5.0]: https://github.com/karanbh01/py-beacon/compare/v0.4.0...v0.5.0
|
|
173
238
|
[0.4.0]: https://github.com/karanbh01/py-beacon/compare/v0.3.1...v0.4.0
|
|
174
239
|
[0.3.1]: https://github.com/karanbh01/py-beacon/compare/v0.3.0...v0.3.1
|
|
175
240
|
[0.3.0]: https://github.com/karanbh01/py-beacon/compare/v0.2.0...v0.3.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: py-beacon-kit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: End-to-end tool kit for index, ETF & Delta-1 derivatives development
|
|
5
5
|
Project-URL: Homepage, https://pybeacon.dev
|
|
6
6
|
Project-URL: Documentation, https://pybeacon.dev/library/
|
|
@@ -47,6 +47,7 @@ Requires-Dist: pytest-asyncio; extra == 'dev'
|
|
|
47
47
|
Requires-Dist: pytest-cov; extra == 'dev'
|
|
48
48
|
Requires-Dist: pytest-mpl; extra == 'dev'
|
|
49
49
|
Requires-Dist: pytest-timeout; extra == 'dev'
|
|
50
|
+
Requires-Dist: pytest-xdist; extra == 'dev'
|
|
50
51
|
Requires-Dist: reportlab; extra == 'dev'
|
|
51
52
|
Requires-Dist: ruff; extra == 'dev'
|
|
52
53
|
Requires-Dist: scipy; extra == 'dev'
|
|
@@ -113,11 +114,14 @@ adds.
|
|
|
113
114
|
## Quickstart
|
|
114
115
|
|
|
115
116
|
Define an index, calculate it, and backtest a portfolio that tracks it. The
|
|
116
|
-
example builds its own small dataset, so it runs as it is
|
|
117
|
+
example builds its own small dataset, so it runs as it is. Each block is a
|
|
118
|
+
cell, as in a notebook, and the charts need the `plot` extra
|
|
119
|
+
(`pip install "py-beacon-kit[plot]"`).
|
|
117
120
|
|
|
118
121
|
```python
|
|
119
122
|
import logging
|
|
120
123
|
|
|
124
|
+
import numpy as np
|
|
121
125
|
import pandas as pd
|
|
122
126
|
|
|
123
127
|
from beacon.backtest import Backtest
|
|
@@ -126,51 +130,159 @@ from beacon.index import EqualWeighted, IndexDefinition
|
|
|
126
130
|
from beacon.index.schedule import sessions
|
|
127
131
|
|
|
128
132
|
logging.getLogger("beacon").setLevel(logging.ERROR) # keep the output short
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Data.** Four stocks priced on every New York Stock Exchange session in
|
|
136
|
+
2024, from a seeded random walk, and the reference data that lists them.
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
days = sessions(pd.Timestamp("2024-01-02"), pd.Timestamp("2024-12-31"), "XNYS")
|
|
140
|
+
names = ["AAA", "BBB", "CCC", "DDD"]
|
|
141
|
+
|
|
142
|
+
rng = np.random.default_rng(28)
|
|
143
|
+
returns = rng.normal(0.0004, 0.015, size=(len(days), len(names)))
|
|
144
|
+
closes = pd.DataFrame(100 * np.exp(returns.cumsum(axis=0)),
|
|
145
|
+
index=days,
|
|
146
|
+
columns=names)
|
|
147
|
+
|
|
148
|
+
prices = [{"IDENTIFIER": name,
|
|
149
|
+
"DATE": day,
|
|
150
|
+
"CLOSE": closes.at[day, name],
|
|
151
|
+
"SHARES_OUTSTANDING": 1_000_000}
|
|
152
|
+
for day in days
|
|
153
|
+
for name in names]
|
|
154
|
+
listings = [{"IDENTIFIER": name,
|
|
155
|
+
"NAME": name,
|
|
156
|
+
"CURRENCY": "USD",
|
|
157
|
+
"EXCHANGE": "XNYS",
|
|
158
|
+
"DATE_FROM": "2020-01-01"}
|
|
159
|
+
for name in names]
|
|
160
|
+
|
|
161
|
+
data = DataFetcher(MarketData.from_dataframe(pd.DataFrame(prices)),
|
|
162
|
+
ReferenceData.from_dataframe(pd.DataFrame(listings)))
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**The index.** Equal weight across the four, rebalanced monthly on the NYSE
|
|
166
|
+
calendar.
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
definition = IndexDefinition(index_id="DEMO",
|
|
170
|
+
index_name="Demo Equal-Weight Index",
|
|
171
|
+
base_date="2024-01-02",
|
|
172
|
+
base_value=1000.0,
|
|
173
|
+
currency="USD",
|
|
174
|
+
eligibility_rules=[],
|
|
175
|
+
weighting_scheme=EqualWeighted(),
|
|
176
|
+
rebalancing_frequency="MONTHLY",
|
|
177
|
+
calendar="XNYS",
|
|
178
|
+
universe_identifiers=names)
|
|
179
|
+
```
|
|
129
180
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
{"IDENTIFIER": name, "DATE": day, "SHARES_OUTSTANDING": 1_000,
|
|
136
|
-
"CLOSE": 100 * (1 + rise) ** (step / (len(days) - 1))}
|
|
137
|
-
for name, rise in growth.items()
|
|
138
|
-
for step, day in enumerate(days)
|
|
139
|
-
]))
|
|
140
|
-
reference = ReferenceData.from_dataframe(pd.DataFrame([
|
|
141
|
-
{"IDENTIFIER": name, "NAME": name, "CURRENCY": "USD",
|
|
142
|
-
"EXCHANGE": "XNYS", "DATE_FROM": "2020-01-01"}
|
|
143
|
-
for name in growth
|
|
144
|
-
]))
|
|
145
|
-
data = DataFetcher(market, reference)
|
|
146
|
-
|
|
147
|
-
# 2. The index: equal weight, rebalanced monthly on the NYSE calendar.
|
|
148
|
-
definition = IndexDefinition(
|
|
149
|
-
index_id="DEMO", index_name="Demo Equal-Weight Index",
|
|
150
|
-
base_date="2024-01-02", base_value=1000.0, currency="USD",
|
|
151
|
-
eligibility_rules=[], weighting_scheme=EqualWeighted(),
|
|
152
|
-
rebalancing_frequency="MONTHLY", calendar="XNYS",
|
|
153
|
-
universe_identifiers=list(growth),
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
# 3. Calculate the index, then simulate a portfolio trading to its weights,
|
|
157
|
-
# paying 5 basis points on every trade.
|
|
158
|
-
backtest = Backtest(initial_capital=1_000_000.0,
|
|
181
|
+
**The backtest.** Calculate the index, then simulate a portfolio trading to
|
|
182
|
+
its weights, paying 5 basis points on every trade.
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
backtest = Backtest(initial_capital=100_000.0,
|
|
159
186
|
transaction_cost_bps=5.0,
|
|
160
187
|
data_provider=data)
|
|
161
188
|
result = backtest.run(definition,
|
|
162
|
-
end="2024-
|
|
189
|
+
end="2024-12-31")
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Results.** The index level and the portfolio's NAV each day, and the
|
|
193
|
+
portfolio's summary metrics against the index.
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
daily = pd.DataFrame({"Index level": result.index.target.levels,
|
|
197
|
+
"Portfolio NAV": result.portfolio.nav})
|
|
198
|
+
daily.tail().round(2)
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
| | Index level | Portfolio NAV |
|
|
202
|
+
|---|---:|---:|
|
|
203
|
+
| 2024-12-24 | 1088.28 | 108747.08 |
|
|
204
|
+
| 2024-12-26 | 1091.06 | 109025.21 |
|
|
205
|
+
| 2024-12-27 | 1097.57 | 109675.70 |
|
|
206
|
+
| 2024-12-30 | 1119.11 | 111828.46 |
|
|
207
|
+
| 2024-12-31 | 1133.80 | 113295.48 |
|
|
208
|
+
|
|
209
|
+
```python
|
|
210
|
+
pd.DataFrame({"Portfolio": result.summary()}).round(4)
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
| | Portfolio |
|
|
214
|
+
|---|---:|
|
|
215
|
+
| total_return | 0.1330 |
|
|
216
|
+
| annualised_return | 0.1330 |
|
|
217
|
+
| volatility | 0.1214 |
|
|
218
|
+
| sharpe_ratio | 1.0950 |
|
|
219
|
+
| max_drawdown | -0.1148 |
|
|
220
|
+
| tracking_error | 0.0005 |
|
|
221
|
+
| tracking_difference | -0.0008 |
|
|
222
|
+
|
|
223
|
+
**Charts.** The index among its four stocks, then the portfolio's growth and
|
|
224
|
+
drawdown. The charts here have no background of their own:
|
|
225
|
+
`transparent-dark-axes` is for a light page and `transparent-light-axes` for
|
|
226
|
+
a dark one, and these are shown in whichever matches yours. `use("light")`
|
|
227
|
+
and `use("dark")` draw on Beacon's own canvas.
|
|
228
|
+
|
|
229
|
+
```python
|
|
230
|
+
from beacon.plot import use
|
|
231
|
+
|
|
232
|
+
use("transparent-dark-axes") # no background, for a light page
|
|
233
|
+
|
|
234
|
+
result.plot.constituents()
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
<picture>
|
|
238
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/docs/images/quickstart-stocks.dark.png">
|
|
239
|
+
<img alt="The equal-weight index drawn over its four stocks, each rebased to 100 over 2024. The index ends at 113.4." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/docs/images/quickstart-stocks.light.png" width="720">
|
|
240
|
+
</picture>
|
|
163
241
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
print("Tracking error: ", round(result.summary()["tracking_error"], 6))
|
|
242
|
+
```python
|
|
243
|
+
result.plot.performance()
|
|
167
244
|
```
|
|
168
245
|
|
|
246
|
+
<picture>
|
|
247
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/docs/images/quickstart-performance.dark.png">
|
|
248
|
+
<img alt="The portfolio's growth of 100 over 2024, ending at 113.4, with its drawdown beneath, deepest at about 11 percent." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/docs/images/quickstart-performance.light.png" width="720">
|
|
249
|
+
</picture>
|
|
250
|
+
|
|
169
251
|
`result.index.target` holds the index the run aimed at, and
|
|
170
252
|
`result.portfolio` holds the simulated portfolio: its NAV, positions, cash and
|
|
171
253
|
transactions. The portfolio ends a little behind the index because it pays
|
|
172
254
|
for its trades.
|
|
173
255
|
|
|
256
|
+
## How it fits together
|
|
257
|
+
|
|
258
|
+
Data, the index and the backtest are separate layers. A `DataFetcher` serves
|
|
259
|
+
every calculation its data. An `IndexDefinition` says what the index holds,
|
|
260
|
+
and `IndexCalculator` computes its history as an `IndexResult`. A backtest
|
|
261
|
+
trades to the index's weights, and a derivative is priced off its levels.
|
|
262
|
+
|
|
263
|
+
<picture>
|
|
264
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/architecture-dark.png">
|
|
265
|
+
<img alt="Data and the methodology feed the calculation, which produces an IndexResult. Derivatives are priced off it, and a backtest trades to its weights and produces a BacktestResult for analysis." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/architecture-light.png" width="464">
|
|
266
|
+
</picture>
|
|
267
|
+
|
|
268
|
+
A backtest has five parts. The strategy decides what is held and the
|
|
269
|
+
implementation how it is traded. Flows move money in and out, which the
|
|
270
|
+
vehicle deals at its price and charges its fees on. The modelling
|
|
271
|
+
assumptions are what the run takes as given.
|
|
272
|
+
|
|
273
|
+
<picture>
|
|
274
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/backtest-dark.png">
|
|
275
|
+
<img alt="The strategy's weights go through the implementation as trades, and flows are dealt through the vehicle as units and fees. Both, with the modelling assumptions, feed Backtest.run(), which produces a BacktestResult." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/backtest-light.png" width="634">
|
|
276
|
+
</picture>
|
|
277
|
+
|
|
278
|
+
The strategy can hold the index in full, track it with fewer names, or try
|
|
279
|
+
to beat it. Each gives the backtest its target weights.
|
|
280
|
+
|
|
281
|
+
<picture>
|
|
282
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/strategies-dark.png">
|
|
283
|
+
<img alt="From the index, an IndexDefinition holds every name at its index weight, IndexTracking holds fewer names, optimised or sampled, and an ActiveStrategy builds weights from a signal and a construction. Each gives target weights." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/strategies-light.png" width="670">
|
|
284
|
+
</picture>
|
|
285
|
+
|
|
174
286
|
## What it does
|
|
175
287
|
|
|
176
288
|
- **Indices.** Select constituents with eligibility rules, including
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# py-beacon
|
|
2
|
+
|
|
3
|
+
[](https://github.com/karanbh01/py-beacon/actions/workflows/ci.yml)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
py-beacon is a Python library for building indices, ETFs and Delta-1
|
|
8
|
+
derivatives. You define an index methodology, calculate the index's history
|
|
9
|
+
on a real exchange calendar, backtest a portfolio that tracks it, and analyse
|
|
10
|
+
the result.
|
|
11
|
+
|
|
12
|
+
**Documentation:** [pybeacon.dev/library](https://pybeacon.dev/library/)
|
|
13
|
+
· **Changelog:** [pybeacon.dev/changelog](https://pybeacon.dev/changelog/)
|
|
14
|
+
· **Source:** [github.com/karanbh01/py-beacon](https://github.com/karanbh01/py-beacon)
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
py-beacon needs Python 3.11 or later.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install py-beacon-kit
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
In code, import it as `beacon`. The core installs pandas, numpy, pydantic and
|
|
25
|
+
exchange_calendars. Optional features are extras: `data` (Yahoo Finance
|
|
26
|
+
downloads), `excel`, `postgres`, `optimise`, `plot`, `pdf` and `server`.
|
|
27
|
+
Install them as `pip install "py-beacon-kit[plot,optimise]"`. The
|
|
28
|
+
[documentation](https://pybeacon.dev/library/#install) lists what each one
|
|
29
|
+
adds.
|
|
30
|
+
|
|
31
|
+
## Quickstart
|
|
32
|
+
|
|
33
|
+
Define an index, calculate it, and backtest a portfolio that tracks it. The
|
|
34
|
+
example builds its own small dataset, so it runs as it is. Each block is a
|
|
35
|
+
cell, as in a notebook, and the charts need the `plot` extra
|
|
36
|
+
(`pip install "py-beacon-kit[plot]"`).
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
import logging
|
|
40
|
+
|
|
41
|
+
import numpy as np
|
|
42
|
+
import pandas as pd
|
|
43
|
+
|
|
44
|
+
from beacon.backtest import Backtest
|
|
45
|
+
from beacon.data import DataFetcher, MarketData, ReferenceData
|
|
46
|
+
from beacon.index import EqualWeighted, IndexDefinition
|
|
47
|
+
from beacon.index.schedule import sessions
|
|
48
|
+
|
|
49
|
+
logging.getLogger("beacon").setLevel(logging.ERROR) # keep the output short
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Data.** Four stocks priced on every New York Stock Exchange session in
|
|
53
|
+
2024, from a seeded random walk, and the reference data that lists them.
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
days = sessions(pd.Timestamp("2024-01-02"), pd.Timestamp("2024-12-31"), "XNYS")
|
|
57
|
+
names = ["AAA", "BBB", "CCC", "DDD"]
|
|
58
|
+
|
|
59
|
+
rng = np.random.default_rng(28)
|
|
60
|
+
returns = rng.normal(0.0004, 0.015, size=(len(days), len(names)))
|
|
61
|
+
closes = pd.DataFrame(100 * np.exp(returns.cumsum(axis=0)),
|
|
62
|
+
index=days,
|
|
63
|
+
columns=names)
|
|
64
|
+
|
|
65
|
+
prices = [{"IDENTIFIER": name,
|
|
66
|
+
"DATE": day,
|
|
67
|
+
"CLOSE": closes.at[day, name],
|
|
68
|
+
"SHARES_OUTSTANDING": 1_000_000}
|
|
69
|
+
for day in days
|
|
70
|
+
for name in names]
|
|
71
|
+
listings = [{"IDENTIFIER": name,
|
|
72
|
+
"NAME": name,
|
|
73
|
+
"CURRENCY": "USD",
|
|
74
|
+
"EXCHANGE": "XNYS",
|
|
75
|
+
"DATE_FROM": "2020-01-01"}
|
|
76
|
+
for name in names]
|
|
77
|
+
|
|
78
|
+
data = DataFetcher(MarketData.from_dataframe(pd.DataFrame(prices)),
|
|
79
|
+
ReferenceData.from_dataframe(pd.DataFrame(listings)))
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**The index.** Equal weight across the four, rebalanced monthly on the NYSE
|
|
83
|
+
calendar.
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
definition = IndexDefinition(index_id="DEMO",
|
|
87
|
+
index_name="Demo Equal-Weight Index",
|
|
88
|
+
base_date="2024-01-02",
|
|
89
|
+
base_value=1000.0,
|
|
90
|
+
currency="USD",
|
|
91
|
+
eligibility_rules=[],
|
|
92
|
+
weighting_scheme=EqualWeighted(),
|
|
93
|
+
rebalancing_frequency="MONTHLY",
|
|
94
|
+
calendar="XNYS",
|
|
95
|
+
universe_identifiers=names)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**The backtest.** Calculate the index, then simulate a portfolio trading to
|
|
99
|
+
its weights, paying 5 basis points on every trade.
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
backtest = Backtest(initial_capital=100_000.0,
|
|
103
|
+
transaction_cost_bps=5.0,
|
|
104
|
+
data_provider=data)
|
|
105
|
+
result = backtest.run(definition,
|
|
106
|
+
end="2024-12-31")
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Results.** The index level and the portfolio's NAV each day, and the
|
|
110
|
+
portfolio's summary metrics against the index.
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
daily = pd.DataFrame({"Index level": result.index.target.levels,
|
|
114
|
+
"Portfolio NAV": result.portfolio.nav})
|
|
115
|
+
daily.tail().round(2)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
| | Index level | Portfolio NAV |
|
|
119
|
+
|---|---:|---:|
|
|
120
|
+
| 2024-12-24 | 1088.28 | 108747.08 |
|
|
121
|
+
| 2024-12-26 | 1091.06 | 109025.21 |
|
|
122
|
+
| 2024-12-27 | 1097.57 | 109675.70 |
|
|
123
|
+
| 2024-12-30 | 1119.11 | 111828.46 |
|
|
124
|
+
| 2024-12-31 | 1133.80 | 113295.48 |
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
pd.DataFrame({"Portfolio": result.summary()}).round(4)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
| | Portfolio |
|
|
131
|
+
|---|---:|
|
|
132
|
+
| total_return | 0.1330 |
|
|
133
|
+
| annualised_return | 0.1330 |
|
|
134
|
+
| volatility | 0.1214 |
|
|
135
|
+
| sharpe_ratio | 1.0950 |
|
|
136
|
+
| max_drawdown | -0.1148 |
|
|
137
|
+
| tracking_error | 0.0005 |
|
|
138
|
+
| tracking_difference | -0.0008 |
|
|
139
|
+
|
|
140
|
+
**Charts.** The index among its four stocks, then the portfolio's growth and
|
|
141
|
+
drawdown. The charts here have no background of their own:
|
|
142
|
+
`transparent-dark-axes` is for a light page and `transparent-light-axes` for
|
|
143
|
+
a dark one, and these are shown in whichever matches yours. `use("light")`
|
|
144
|
+
and `use("dark")` draw on Beacon's own canvas.
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
from beacon.plot import use
|
|
148
|
+
|
|
149
|
+
use("transparent-dark-axes") # no background, for a light page
|
|
150
|
+
|
|
151
|
+
result.plot.constituents()
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
<picture>
|
|
155
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/docs/images/quickstart-stocks.dark.png">
|
|
156
|
+
<img alt="The equal-weight index drawn over its four stocks, each rebased to 100 over 2024. The index ends at 113.4." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/docs/images/quickstart-stocks.light.png" width="720">
|
|
157
|
+
</picture>
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
result.plot.performance()
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
<picture>
|
|
164
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/docs/images/quickstart-performance.dark.png">
|
|
165
|
+
<img alt="The portfolio's growth of 100 over 2024, ending at 113.4, with its drawdown beneath, deepest at about 11 percent." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/docs/images/quickstart-performance.light.png" width="720">
|
|
166
|
+
</picture>
|
|
167
|
+
|
|
168
|
+
`result.index.target` holds the index the run aimed at, and
|
|
169
|
+
`result.portfolio` holds the simulated portfolio: its NAV, positions, cash and
|
|
170
|
+
transactions. The portfolio ends a little behind the index because it pays
|
|
171
|
+
for its trades.
|
|
172
|
+
|
|
173
|
+
## How it fits together
|
|
174
|
+
|
|
175
|
+
Data, the index and the backtest are separate layers. A `DataFetcher` serves
|
|
176
|
+
every calculation its data. An `IndexDefinition` says what the index holds,
|
|
177
|
+
and `IndexCalculator` computes its history as an `IndexResult`. A backtest
|
|
178
|
+
trades to the index's weights, and a derivative is priced off its levels.
|
|
179
|
+
|
|
180
|
+
<picture>
|
|
181
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/architecture-dark.png">
|
|
182
|
+
<img alt="Data and the methodology feed the calculation, which produces an IndexResult. Derivatives are priced off it, and a backtest trades to its weights and produces a BacktestResult for analysis." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/architecture-light.png" width="464">
|
|
183
|
+
</picture>
|
|
184
|
+
|
|
185
|
+
A backtest has five parts. The strategy decides what is held and the
|
|
186
|
+
implementation how it is traded. Flows move money in and out, which the
|
|
187
|
+
vehicle deals at its price and charges its fees on. The modelling
|
|
188
|
+
assumptions are what the run takes as given.
|
|
189
|
+
|
|
190
|
+
<picture>
|
|
191
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/backtest-dark.png">
|
|
192
|
+
<img alt="The strategy's weights go through the implementation as trades, and flows are dealt through the vehicle as units and fees. Both, with the modelling assumptions, feed Backtest.run(), which produces a BacktestResult." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/backtest-light.png" width="634">
|
|
193
|
+
</picture>
|
|
194
|
+
|
|
195
|
+
The strategy can hold the index in full, track it with fewer names, or try
|
|
196
|
+
to beat it. Each gives the backtest its target weights.
|
|
197
|
+
|
|
198
|
+
<picture>
|
|
199
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/strategies-dark.png">
|
|
200
|
+
<img alt="From the index, an IndexDefinition holds every name at its index weight, IndexTracking holds fewer names, optimised or sampled, and an ActiveStrategy builds weights from a signal and a construction. Each gives target weights." src="https://raw.githubusercontent.com/karanbh01/py-beacon/main/.github/assets/strategies-light.png" width="670">
|
|
201
|
+
</picture>
|
|
202
|
+
|
|
203
|
+
## What it does
|
|
204
|
+
|
|
205
|
+
- **Indices.** Select constituents with eligibility rules, including
|
|
206
|
+
expressions such as `data.market.market_cap > 1e9`; weight them equally or
|
|
207
|
+
by (free-float) market cap; cap any one name's weight; and rebalance on a
|
|
208
|
+
schedule against a real exchange calendar. Indices can be price, total
|
|
209
|
+
return or net total return, and the divisor handles rebalances, special
|
|
210
|
+
dividends and delistings.
|
|
211
|
+
([Methodology](https://pybeacon.dev/library/concepts/methodology/))
|
|
212
|
+
- **Backtests.** Simulate a portfolio trading towards the index's weights,
|
|
213
|
+
with transaction costs, drift thresholds and a benchmark, then read its
|
|
214
|
+
NAV, trades and tracking error.
|
|
215
|
+
([Backtest](https://pybeacon.dev/library/concepts/backtest/))
|
|
216
|
+
- **Data.** Load prices and reference data from CSV or Excel files, a data
|
|
217
|
+
store on disk, a Postgres database or Yahoo Finance, or generate a
|
|
218
|
+
realistic synthetic market. Names in several currencies are converted with
|
|
219
|
+
FX rates. ([Data](https://pybeacon.dev/library/concepts/data/))
|
|
220
|
+
- **Funds and derivatives.** Index funds and ETFs with management fees;
|
|
221
|
+
index and ETF futures and total return swaps, with pricing functions.
|
|
222
|
+
([Funds](https://pybeacon.dev/library/concepts/funds/),
|
|
223
|
+
[Derivatives](https://pybeacon.dev/library/concepts/derivatives/))
|
|
224
|
+
- **Optimisation and risk.** Optimised indices and portfolios under
|
|
225
|
+
constraints, covariance estimation with shrinkage, factor models, and risk
|
|
226
|
+
contributions.
|
|
227
|
+
([Optimiser](https://pybeacon.dev/library/concepts/optimiser/),
|
|
228
|
+
[Risk model](https://pybeacon.dev/library/concepts/risk-model/))
|
|
229
|
+
- **Analysis and output.** Return and risk attribution, concentration and
|
|
230
|
+
drift, charts drawn from results, and PDF and Excel reports.
|
|
231
|
+
([Attribution](https://pybeacon.dev/library/concepts/attribution/),
|
|
232
|
+
[Charts](https://pybeacon.dev/library/concepts/charts/),
|
|
233
|
+
[Reports](https://pybeacon.dev/library/concepts/reports/))
|
|
234
|
+
|
|
235
|
+
## The local server
|
|
236
|
+
|
|
237
|
+
py-beacon also runs as a local API server, which is how the Beacon desktop
|
|
238
|
+
app uses it. This generates a synthetic dataset and serves it:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
pip install "py-beacon-kit[server]"
|
|
242
|
+
python -m beacon.synthetic --seed 42
|
|
243
|
+
python -m beacon.server --port 0 --token dev
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
See the [server guide](https://pybeacon.dev/library/server/) and
|
|
247
|
+
[serving data](https://pybeacon.dev/library/serving-data/).
|
|
248
|
+
|
|
249
|
+
## Versioning
|
|
250
|
+
|
|
251
|
+
py-beacon follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
252
|
+
Before 1.0 the API is still settling: a breaking change raises the minor
|
|
253
|
+
version (0.1 to 0.2), and additions and fixes raise the patch. The full
|
|
254
|
+
policy is in
|
|
255
|
+
[CONTRIBUTING.md](https://github.com/karanbh01/py-beacon/blob/main/CONTRIBUTING.md#versioning-and-deprecation-policy).
|
|
256
|
+
|
|
257
|
+
## Contributing
|
|
258
|
+
|
|
259
|
+
See [CONTRIBUTING.md](https://github.com/karanbh01/py-beacon/blob/main/CONTRIBUTING.md)
|
|
260
|
+
for setting up a development install, the checks every change must pass, and
|
|
261
|
+
the release process.
|
|
262
|
+
|
|
263
|
+
py-beacon is released under the MIT licence.
|
|
@@ -75,6 +75,7 @@ dev = [
|
|
|
75
75
|
"pytest-asyncio", # the job registry is driven on an event loop
|
|
76
76
|
"pytest-cov",
|
|
77
77
|
"pytest-timeout", # a hung job or socket read must fail, not stall CI
|
|
78
|
+
"pytest-xdist", # CI runs the suite across the runner's cores
|
|
78
79
|
"ruff",
|
|
79
80
|
"mypy",
|
|
80
81
|
"pre-commit",
|
|
@@ -93,6 +94,10 @@ Source = "https://github.com/karanbh01/py-beacon"
|
|
|
93
94
|
Changelog = "https://pybeacon.dev/changelog/"
|
|
94
95
|
|
|
95
96
|
[tool.pytest.ini_options]
|
|
97
|
+
# The image regression tests start from matplotlib's defaults, as a user's
|
|
98
|
+
# session does, not from the "classic" style pytest-mpl otherwise applies:
|
|
99
|
+
# keys the beacon style leaves alone would differ from what users see.
|
|
100
|
+
mpl-default-style = "default"
|
|
96
101
|
markers = [
|
|
97
102
|
"slow: multi-minute tests (the example notebooks); routine local runs deselect with -m 'not slow', CI runs everything",
|
|
98
103
|
]
|