@insiderfinance/totalfinance 0.1.0
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.
- package/LICENSE +201 -0
- package/README.md +339 -0
- package/STABILITY.md +23 -0
- package/modules/backtest/dist/artifacts.d.ts +23 -0
- package/modules/backtest/dist/artifacts.d.ts.map +1 -0
- package/modules/backtest/dist/artifacts.js +22 -0
- package/modules/backtest/dist/artifacts.js.map +1 -0
- package/modules/backtest/dist/broker.d.ts +265 -0
- package/modules/backtest/dist/broker.d.ts.map +1 -0
- package/modules/backtest/dist/broker.js +1228 -0
- package/modules/backtest/dist/broker.js.map +1 -0
- package/modules/backtest/dist/costs.d.ts +67 -0
- package/modules/backtest/dist/costs.d.ts.map +1 -0
- package/modules/backtest/dist/costs.js +171 -0
- package/modules/backtest/dist/costs.js.map +1 -0
- package/modules/backtest/dist/cross-sectional/engine.d.ts +21 -0
- package/modules/backtest/dist/cross-sectional/engine.d.ts.map +1 -0
- package/modules/backtest/dist/cross-sectional/engine.js +1399 -0
- package/modules/backtest/dist/cross-sectional/engine.js.map +1 -0
- package/modules/backtest/dist/cross-sectional/folds.d.ts +134 -0
- package/modules/backtest/dist/cross-sectional/folds.d.ts.map +1 -0
- package/modules/backtest/dist/cross-sectional/folds.js +375 -0
- package/modules/backtest/dist/cross-sectional/folds.js.map +1 -0
- package/modules/backtest/dist/cross-sectional/grid.d.ts +142 -0
- package/modules/backtest/dist/cross-sectional/grid.d.ts.map +1 -0
- package/modules/backtest/dist/cross-sectional/grid.js +394 -0
- package/modules/backtest/dist/cross-sectional/grid.js.map +1 -0
- package/modules/backtest/dist/cross-sectional/index.d.ts +18 -0
- package/modules/backtest/dist/cross-sectional/index.d.ts.map +1 -0
- package/modules/backtest/dist/cross-sectional/index.js +15 -0
- package/modules/backtest/dist/cross-sectional/index.js.map +1 -0
- package/modules/backtest/dist/cross-sectional/types.d.ts +331 -0
- package/modules/backtest/dist/cross-sectional/types.d.ts.map +1 -0
- package/modules/backtest/dist/cross-sectional/types.js +12 -0
- package/modules/backtest/dist/cross-sectional/types.js.map +1 -0
- package/modules/backtest/dist/cross-sectional/validate.d.ts +22 -0
- package/modules/backtest/dist/cross-sectional/validate.d.ts.map +1 -0
- package/modules/backtest/dist/cross-sectional/validate.js +489 -0
- package/modules/backtest/dist/cross-sectional/validate.js.map +1 -0
- package/modules/backtest/dist/diagnostics.d.ts +16 -0
- package/modules/backtest/dist/diagnostics.d.ts.map +1 -0
- package/modules/backtest/dist/diagnostics.js +63 -0
- package/modules/backtest/dist/diagnostics.js.map +1 -0
- package/modules/backtest/dist/environment/bench.d.ts +34 -0
- package/modules/backtest/dist/environment/bench.d.ts.map +1 -0
- package/modules/backtest/dist/environment/bench.js +724 -0
- package/modules/backtest/dist/environment/bench.js.map +1 -0
- package/modules/backtest/dist/environment/environment.d.ts +5 -0
- package/modules/backtest/dist/environment/environment.d.ts.map +1 -0
- package/modules/backtest/dist/environment/environment.js +618 -0
- package/modules/backtest/dist/environment/environment.js.map +1 -0
- package/modules/backtest/dist/environment/episode.d.ts +4 -0
- package/modules/backtest/dist/environment/episode.d.ts.map +1 -0
- package/modules/backtest/dist/environment/episode.js +121 -0
- package/modules/backtest/dist/environment/episode.js.map +1 -0
- package/modules/backtest/dist/environment/episodes.d.ts +14 -0
- package/modules/backtest/dist/environment/episodes.d.ts.map +1 -0
- package/modules/backtest/dist/environment/episodes.js +644 -0
- package/modules/backtest/dist/environment/episodes.js.map +1 -0
- package/modules/backtest/dist/environment/features.d.ts +31 -0
- package/modules/backtest/dist/environment/features.d.ts.map +1 -0
- package/modules/backtest/dist/environment/features.js +157 -0
- package/modules/backtest/dist/environment/features.js.map +1 -0
- package/modules/backtest/dist/environment/index.d.ts +14 -0
- package/modules/backtest/dist/environment/index.d.ts.map +1 -0
- package/modules/backtest/dist/environment/index.js +12 -0
- package/modules/backtest/dist/environment/index.js.map +1 -0
- package/modules/backtest/dist/environment/limits.d.ts +63 -0
- package/modules/backtest/dist/environment/limits.d.ts.map +1 -0
- package/modules/backtest/dist/environment/limits.js +253 -0
- package/modules/backtest/dist/environment/limits.js.map +1 -0
- package/modules/backtest/dist/environment/reward.d.ts +5 -0
- package/modules/backtest/dist/environment/reward.d.ts.map +1 -0
- package/modules/backtest/dist/environment/reward.js +80 -0
- package/modules/backtest/dist/environment/reward.js.map +1 -0
- package/modules/backtest/dist/environment/types.d.ts +540 -0
- package/modules/backtest/dist/environment/types.d.ts.map +1 -0
- package/modules/backtest/dist/environment/types.js +2 -0
- package/modules/backtest/dist/environment/types.js.map +1 -0
- package/modules/backtest/dist/environment/validate.d.ts +23 -0
- package/modules/backtest/dist/environment/validate.d.ts.map +1 -0
- package/modules/backtest/dist/environment/validate.js +264 -0
- package/modules/backtest/dist/environment/validate.js.map +1 -0
- package/modules/backtest/dist/event-driven.d.ts +111 -0
- package/modules/backtest/dist/event-driven.d.ts.map +1 -0
- package/modules/backtest/dist/event-driven.js +325 -0
- package/modules/backtest/dist/event-driven.js.map +1 -0
- package/modules/backtest/dist/execution/conformance.d.ts +33 -0
- package/modules/backtest/dist/execution/conformance.d.ts.map +1 -0
- package/modules/backtest/dist/execution/conformance.js +269 -0
- package/modules/backtest/dist/execution/conformance.js.map +1 -0
- package/modules/backtest/dist/execution/fill-models.d.ts +35 -0
- package/modules/backtest/dist/execution/fill-models.d.ts.map +1 -0
- package/modules/backtest/dist/execution/fill-models.js +375 -0
- package/modules/backtest/dist/execution/fill-models.js.map +1 -0
- package/modules/backtest/dist/execution/fill-order.d.ts +55 -0
- package/modules/backtest/dist/execution/fill-order.d.ts.map +1 -0
- package/modules/backtest/dist/execution/fill-order.js +156 -0
- package/modules/backtest/dist/execution/fill-order.js.map +1 -0
- package/modules/backtest/dist/execution/index.d.ts +33 -0
- package/modules/backtest/dist/execution/index.d.ts.map +1 -0
- package/modules/backtest/dist/execution/index.js +27 -0
- package/modules/backtest/dist/execution/index.js.map +1 -0
- package/modules/backtest/dist/execution/intrabar.d.ts +46 -0
- package/modules/backtest/dist/execution/intrabar.d.ts.map +1 -0
- package/modules/backtest/dist/execution/intrabar.js +130 -0
- package/modules/backtest/dist/execution/intrabar.js.map +1 -0
- package/modules/backtest/dist/execution/normalized.d.ts +56 -0
- package/modules/backtest/dist/execution/normalized.d.ts.map +1 -0
- package/modules/backtest/dist/execution/normalized.js +154 -0
- package/modules/backtest/dist/execution/normalized.js.map +1 -0
- package/modules/backtest/dist/execution/policy.d.ts +84 -0
- package/modules/backtest/dist/execution/policy.d.ts.map +1 -0
- package/modules/backtest/dist/execution/policy.js +341 -0
- package/modules/backtest/dist/execution/policy.js.map +1 -0
- package/modules/backtest/dist/execution/types.d.ts +217 -0
- package/modules/backtest/dist/execution/types.d.ts.map +1 -0
- package/modules/backtest/dist/execution/types.js +8 -0
- package/modules/backtest/dist/execution/types.js.map +1 -0
- package/modules/backtest/dist/execution/validate.d.ts +35 -0
- package/modules/backtest/dist/execution/validate.d.ts.map +1 -0
- package/modules/backtest/dist/execution/validate.js +666 -0
- package/modules/backtest/dist/execution/validate.js.map +1 -0
- package/modules/backtest/dist/generated/validation-specs.d.ts +12 -0
- package/modules/backtest/dist/generated/validation-specs.d.ts.map +1 -0
- package/modules/backtest/dist/generated/validation-specs.js +1129 -0
- package/modules/backtest/dist/generated/validation-specs.js.map +1 -0
- package/modules/backtest/dist/index.d.ts +33 -0
- package/modules/backtest/dist/index.d.ts.map +1 -0
- package/modules/backtest/dist/index.js +28 -0
- package/modules/backtest/dist/index.js.map +1 -0
- package/modules/backtest/dist/options/chain.d.ts +68 -0
- package/modules/backtest/dist/options/chain.d.ts.map +1 -0
- package/modules/backtest/dist/options/chain.js +303 -0
- package/modules/backtest/dist/options/chain.js.map +1 -0
- package/modules/backtest/dist/options/engine.d.ts +28 -0
- package/modules/backtest/dist/options/engine.d.ts.map +1 -0
- package/modules/backtest/dist/options/engine.js +1859 -0
- package/modules/backtest/dist/options/engine.js.map +1 -0
- package/modules/backtest/dist/options/index.d.ts +23 -0
- package/modules/backtest/dist/options/index.d.ts.map +1 -0
- package/modules/backtest/dist/options/index.js +21 -0
- package/modules/backtest/dist/options/index.js.map +1 -0
- package/modules/backtest/dist/options/tearsheet.d.ts +77 -0
- package/modules/backtest/dist/options/tearsheet.d.ts.map +1 -0
- package/modules/backtest/dist/options/tearsheet.js +205 -0
- package/modules/backtest/dist/options/tearsheet.js.map +1 -0
- package/modules/backtest/dist/options/types.d.ts +571 -0
- package/modules/backtest/dist/options/types.d.ts.map +1 -0
- package/modules/backtest/dist/options/types.js +19 -0
- package/modules/backtest/dist/options/types.js.map +1 -0
- package/modules/backtest/dist/paper/index.d.ts +13 -0
- package/modules/backtest/dist/paper/index.d.ts.map +1 -0
- package/modules/backtest/dist/paper/index.js +12 -0
- package/modules/backtest/dist/paper/index.js.map +1 -0
- package/modules/backtest/dist/paper/paper.d.ts +8 -0
- package/modules/backtest/dist/paper/paper.d.ts.map +1 -0
- package/modules/backtest/dist/paper/paper.js +950 -0
- package/modules/backtest/dist/paper/paper.js.map +1 -0
- package/modules/backtest/dist/paper/types.d.ts +190 -0
- package/modules/backtest/dist/paper/types.d.ts.map +1 -0
- package/modules/backtest/dist/paper/types.js +3 -0
- package/modules/backtest/dist/paper/types.js.map +1 -0
- package/modules/backtest/dist/paper/validate.d.ts +9 -0
- package/modules/backtest/dist/paper/validate.d.ts.map +1 -0
- package/modules/backtest/dist/paper/validate.js +112 -0
- package/modules/backtest/dist/paper/validate.js.map +1 -0
- package/modules/backtest/dist/portfolio/adapters.d.ts +37 -0
- package/modules/backtest/dist/portfolio/adapters.d.ts.map +1 -0
- package/modules/backtest/dist/portfolio/adapters.js +555 -0
- package/modules/backtest/dist/portfolio/adapters.js.map +1 -0
- package/modules/backtest/dist/portfolio/engine.d.ts +35 -0
- package/modules/backtest/dist/portfolio/engine.d.ts.map +1 -0
- package/modules/backtest/dist/portfolio/engine.js +1300 -0
- package/modules/backtest/dist/portfolio/engine.js.map +1 -0
- package/modules/backtest/dist/portfolio/index.d.ts +12 -0
- package/modules/backtest/dist/portfolio/index.d.ts.map +1 -0
- package/modules/backtest/dist/portfolio/index.js +11 -0
- package/modules/backtest/dist/portfolio/index.js.map +1 -0
- package/modules/backtest/dist/portfolio/types.d.ts +418 -0
- package/modules/backtest/dist/portfolio/types.d.ts.map +1 -0
- package/modules/backtest/dist/portfolio/types.js +8 -0
- package/modules/backtest/dist/portfolio/types.js.map +1 -0
- package/modules/backtest/dist/portfolio/validate.d.ts +26 -0
- package/modules/backtest/dist/portfolio/validate.d.ts.map +1 -0
- package/modules/backtest/dist/portfolio/validate.js +556 -0
- package/modules/backtest/dist/portfolio/validate.js.map +1 -0
- package/modules/backtest/dist/run-artifacts.d.ts +425 -0
- package/modules/backtest/dist/run-artifacts.d.ts.map +1 -0
- package/modules/backtest/dist/run-artifacts.js +1843 -0
- package/modules/backtest/dist/run-artifacts.js.map +1 -0
- package/modules/backtest/dist/signals.d.ts +110 -0
- package/modules/backtest/dist/signals.d.ts.map +1 -0
- package/modules/backtest/dist/signals.js +207 -0
- package/modules/backtest/dist/signals.js.map +1 -0
- package/modules/backtest/dist/tearsheet.d.ts +126 -0
- package/modules/backtest/dist/tearsheet.d.ts.map +1 -0
- package/modules/backtest/dist/tearsheet.js +266 -0
- package/modules/backtest/dist/tearsheet.js.map +1 -0
- package/modules/backtest/dist/types.d.ts +175 -0
- package/modules/backtest/dist/types.d.ts.map +1 -0
- package/modules/backtest/dist/types.js +29 -0
- package/modules/backtest/dist/types.js.map +1 -0
- package/modules/backtest/dist/validate.d.ts +13 -0
- package/modules/backtest/dist/validate.d.ts.map +1 -0
- package/modules/backtest/dist/validate.js +37 -0
- package/modules/backtest/dist/validate.js.map +1 -0
- package/modules/backtest/dist/vectorized.d.ts +53 -0
- package/modules/backtest/dist/vectorized.d.ts.map +1 -0
- package/modules/backtest/dist/vectorized.js +383 -0
- package/modules/backtest/dist/vectorized.js.map +1 -0
- package/modules/backtest/dist/walk-forward.d.ts +57 -0
- package/modules/backtest/dist/walk-forward.d.ts.map +1 -0
- package/modules/backtest/dist/walk-forward.js +125 -0
- package/modules/backtest/dist/walk-forward.js.map +1 -0
- package/modules/backtest/etc/backtest.api.md +139 -0
- package/modules/backtest/src/artifacts.ts +54 -0
- package/modules/backtest/src/broker.ts +1529 -0
- package/modules/backtest/src/costs.ts +225 -0
- package/modules/backtest/src/cross-sectional/engine.ts +1608 -0
- package/modules/backtest/src/cross-sectional/folds.ts +718 -0
- package/modules/backtest/src/cross-sectional/grid.ts +646 -0
- package/modules/backtest/src/cross-sectional/index.ts +76 -0
- package/modules/backtest/src/cross-sectional/types.ts +363 -0
- package/modules/backtest/src/cross-sectional/validate.ts +906 -0
- package/modules/backtest/src/diagnostics.ts +66 -0
- package/modules/backtest/src/environment/bench.ts +1022 -0
- package/modules/backtest/src/environment/environment.ts +766 -0
- package/modules/backtest/src/environment/episode.ts +146 -0
- package/modules/backtest/src/environment/episodes.ts +786 -0
- package/modules/backtest/src/environment/features.ts +184 -0
- package/modules/backtest/src/environment/index.ts +79 -0
- package/modules/backtest/src/environment/limits.ts +383 -0
- package/modules/backtest/src/environment/reward.ts +98 -0
- package/modules/backtest/src/environment/types.ts +595 -0
- package/modules/backtest/src/environment/validate.ts +415 -0
- package/modules/backtest/src/event-driven.ts +528 -0
- package/modules/backtest/src/execution/conformance.ts +346 -0
- package/modules/backtest/src/execution/fill-models.ts +410 -0
- package/modules/backtest/src/execution/fill-order.ts +261 -0
- package/modules/backtest/src/execution/index.ts +91 -0
- package/modules/backtest/src/execution/intrabar.ts +185 -0
- package/modules/backtest/src/execution/normalized.ts +216 -0
- package/modules/backtest/src/execution/policy.ts +447 -0
- package/modules/backtest/src/execution/types.ts +239 -0
- package/modules/backtest/src/execution/validate.ts +889 -0
- package/modules/backtest/src/generated/validation-specs.ts +1132 -0
- package/modules/backtest/src/index.ts +157 -0
- package/modules/backtest/src/options/chain.ts +410 -0
- package/modules/backtest/src/options/engine.ts +2240 -0
- package/modules/backtest/src/options/index.ts +68 -0
- package/modules/backtest/src/options/tearsheet.ts +327 -0
- package/modules/backtest/src/options/types.ts +573 -0
- package/modules/backtest/src/paper/index.ts +27 -0
- package/modules/backtest/src/paper/paper.ts +1288 -0
- package/modules/backtest/src/paper/types.ts +221 -0
- package/modules/backtest/src/paper/validate.ts +168 -0
- package/modules/backtest/src/portfolio/adapters.ts +651 -0
- package/modules/backtest/src/portfolio/engine.ts +1518 -0
- package/modules/backtest/src/portfolio/index.ts +64 -0
- package/modules/backtest/src/portfolio/types.ts +456 -0
- package/modules/backtest/src/portfolio/validate.ts +861 -0
- package/modules/backtest/src/run-artifacts.ts +2873 -0
- package/modules/backtest/src/signals.ts +267 -0
- package/modules/backtest/src/tearsheet.ts +425 -0
- package/modules/backtest/src/types.ts +200 -0
- package/modules/backtest/src/validate.ts +43 -0
- package/modules/backtest/src/vectorized.ts +541 -0
- package/modules/backtest/src/walk-forward.ts +215 -0
- package/modules/calendars/dist/cboe.d.ts +15 -0
- package/modules/calendars/dist/cboe.d.ts.map +1 -0
- package/modules/calendars/dist/cboe.js +16 -0
- package/modules/calendars/dist/cboe.js.map +1 -0
- package/modules/calendars/dist/crypto.d.ts +15 -0
- package/modules/calendars/dist/crypto.d.ts.map +1 -0
- package/modules/calendars/dist/crypto.js +16 -0
- package/modules/calendars/dist/crypto.js.map +1 -0
- package/modules/calendars/dist/expirations.d.ts +35 -0
- package/modules/calendars/dist/expirations.d.ts.map +1 -0
- package/modules/calendars/dist/expirations.js +158 -0
- package/modules/calendars/dist/expirations.js.map +1 -0
- package/modules/calendars/dist/index.d.ts +16 -0
- package/modules/calendars/dist/index.d.ts.map +1 -0
- package/modules/calendars/dist/index.js +13 -0
- package/modules/calendars/dist/index.js.map +1 -0
- package/modules/calendars/dist/nyse.d.ts +11 -0
- package/modules/calendars/dist/nyse.d.ts.map +1 -0
- package/modules/calendars/dist/nyse.js +12 -0
- package/modules/calendars/dist/nyse.js.map +1 -0
- package/modules/calendars/dist/trading-calendar.d.ts +32 -0
- package/modules/calendars/dist/trading-calendar.d.ts.map +1 -0
- package/modules/calendars/dist/trading-calendar.js +67 -0
- package/modules/calendars/dist/trading-calendar.js.map +1 -0
- package/modules/calendars/dist/us-market.d.ts +29 -0
- package/modules/calendars/dist/us-market.d.ts.map +1 -0
- package/modules/calendars/dist/us-market.js +72 -0
- package/modules/calendars/dist/us-market.js.map +1 -0
- package/modules/calendars/etc/calendars.api.md +22 -0
- package/modules/calendars/src/cboe.ts +17 -0
- package/modules/calendars/src/crypto.ts +17 -0
- package/modules/calendars/src/expirations.ts +200 -0
- package/modules/calendars/src/index.ts +23 -0
- package/modules/calendars/src/nyse.ts +13 -0
- package/modules/calendars/src/trading-calendar.ts +85 -0
- package/modules/calendars/src/us-market.ts +86 -0
- package/modules/cli/dist/bin.d.ts +9 -0
- package/modules/cli/dist/bin.d.ts.map +1 -0
- package/modules/cli/dist/bin.js +458 -0
- package/modules/cli/dist/bin.js.map +1 -0
- package/modules/cli/dist/commands.d.ts +7 -0
- package/modules/cli/dist/commands.d.ts.map +1 -0
- package/modules/cli/dist/commands.js +17 -0
- package/modules/cli/dist/commands.js.map +1 -0
- package/modules/cli/dist/exit-codes.d.ts +20 -0
- package/modules/cli/dist/exit-codes.d.ts.map +1 -0
- package/modules/cli/dist/exit-codes.js +19 -0
- package/modules/cli/dist/exit-codes.js.map +1 -0
- package/modules/cli/dist/index.d.ts +13 -0
- package/modules/cli/dist/index.d.ts.map +1 -0
- package/modules/cli/dist/index.js +10 -0
- package/modules/cli/dist/index.js.map +1 -0
- package/modules/cli/etc/cli.api.md +25 -0
- package/modules/cli/src/bin.ts +530 -0
- package/modules/cli/src/commands.ts +19 -0
- package/modules/cli/src/exit-codes.ts +21 -0
- package/modules/cli/src/index.ts +29 -0
- package/modules/commodities/dist/forwards.d.ts +274 -0
- package/modules/commodities/dist/forwards.d.ts.map +1 -0
- package/modules/commodities/dist/forwards.js +359 -0
- package/modules/commodities/dist/forwards.js.map +1 -0
- package/modules/commodities/dist/index.d.ts +10 -0
- package/modules/commodities/dist/index.d.ts.map +1 -0
- package/modules/commodities/dist/index.js +10 -0
- package/modules/commodities/dist/index.js.map +1 -0
- package/modules/commodities/dist/internal.d.ts +6 -0
- package/modules/commodities/dist/internal.d.ts.map +1 -0
- package/modules/commodities/dist/internal.js +6 -0
- package/modules/commodities/dist/internal.js.map +1 -0
- package/modules/commodities/dist/term-structure.d.ts +327 -0
- package/modules/commodities/dist/term-structure.d.ts.map +1 -0
- package/modules/commodities/dist/term-structure.js +416 -0
- package/modules/commodities/dist/term-structure.js.map +1 -0
- package/modules/commodities/etc/commodities.api.md +53 -0
- package/modules/commodities/src/forwards.ts +791 -0
- package/modules/commodities/src/index.ts +10 -0
- package/modules/commodities/src/internal.ts +6 -0
- package/modules/commodities/src/term-structure.ts +828 -0
- package/modules/core/dist/artifacts/analysis-artifact.d.ts +140 -0
- package/modules/core/dist/artifacts/analysis-artifact.d.ts.map +1 -0
- package/modules/core/dist/artifacts/analysis-artifact.js +356 -0
- package/modules/core/dist/artifacts/analysis-artifact.js.map +1 -0
- package/modules/core/dist/artifacts/calculation-comparison.d.ts +125 -0
- package/modules/core/dist/artifacts/calculation-comparison.d.ts.map +1 -0
- package/modules/core/dist/artifacts/calculation-comparison.js +444 -0
- package/modules/core/dist/artifacts/calculation-comparison.js.map +1 -0
- package/modules/core/dist/artifacts/canonical-scan.d.ts +58 -0
- package/modules/core/dist/artifacts/canonical-scan.d.ts.map +1 -0
- package/modules/core/dist/artifacts/canonical-scan.js +250 -0
- package/modules/core/dist/artifacts/canonical-scan.js.map +1 -0
- package/modules/core/dist/artifacts/comparison.d.ts +179 -0
- package/modules/core/dist/artifacts/comparison.d.ts.map +1 -0
- package/modules/core/dist/artifacts/comparison.js +383 -0
- package/modules/core/dist/artifacts/comparison.js.map +1 -0
- package/modules/core/dist/artifacts/content-hash.d.ts +38 -0
- package/modules/core/dist/artifacts/content-hash.d.ts.map +1 -0
- package/modules/core/dist/artifacts/content-hash.js +170 -0
- package/modules/core/dist/artifacts/content-hash.js.map +1 -0
- package/modules/core/dist/artifacts/deep-freeze.d.ts +8 -0
- package/modules/core/dist/artifacts/deep-freeze.d.ts.map +1 -0
- package/modules/core/dist/artifacts/deep-freeze.js +16 -0
- package/modules/core/dist/artifacts/deep-freeze.js.map +1 -0
- package/modules/core/dist/artifacts/fitted-model-kit.d.ts +123 -0
- package/modules/core/dist/artifacts/fitted-model-kit.d.ts.map +1 -0
- package/modules/core/dist/artifacts/fitted-model-kit.js +281 -0
- package/modules/core/dist/artifacts/fitted-model-kit.js.map +1 -0
- package/modules/core/dist/artifacts/fitted-model-summary.d.ts +73 -0
- package/modules/core/dist/artifacts/fitted-model-summary.d.ts.map +1 -0
- package/modules/core/dist/artifacts/fitted-model-summary.js +254 -0
- package/modules/core/dist/artifacts/fitted-model-summary.js.map +1 -0
- package/modules/core/dist/artifacts/index.d.ts +52 -0
- package/modules/core/dist/artifacts/index.d.ts.map +1 -0
- package/modules/core/dist/artifacts/index.js +47 -0
- package/modules/core/dist/artifacts/index.js.map +1 -0
- package/modules/core/dist/artifacts/market-snapshot.d.ts +189 -0
- package/modules/core/dist/artifacts/market-snapshot.d.ts.map +1 -0
- package/modules/core/dist/artifacts/market-snapshot.js +517 -0
- package/modules/core/dist/artifacts/market-snapshot.js.map +1 -0
- package/modules/core/dist/artifacts/migration.d.ts +60 -0
- package/modules/core/dist/artifacts/migration.d.ts.map +1 -0
- package/modules/core/dist/artifacts/migration.js +106 -0
- package/modules/core/dist/artifacts/migration.js.map +1 -0
- package/modules/core/dist/artifacts/numeric-comparison.d.ts +12 -0
- package/modules/core/dist/artifacts/numeric-comparison.d.ts.map +1 -0
- package/modules/core/dist/artifacts/numeric-comparison.js +53 -0
- package/modules/core/dist/artifacts/numeric-comparison.js.map +1 -0
- package/modules/core/dist/artifacts/scenario-set.d.ts +97 -0
- package/modules/core/dist/artifacts/scenario-set.d.ts.map +1 -0
- package/modules/core/dist/artifacts/scenario-set.js +249 -0
- package/modules/core/dist/artifacts/scenario-set.js.map +1 -0
- package/modules/core/dist/artifacts/table-handle.d.ts +96 -0
- package/modules/core/dist/artifacts/table-handle.d.ts.map +1 -0
- package/modules/core/dist/artifacts/table-handle.js +253 -0
- package/modules/core/dist/artifacts/table-handle.js.map +1 -0
- package/modules/core/dist/assumptions.d.ts +52 -0
- package/modules/core/dist/assumptions.d.ts.map +1 -0
- package/modules/core/dist/assumptions.js +13 -0
- package/modules/core/dist/assumptions.js.map +1 -0
- package/modules/core/dist/calendar.d.ts +98 -0
- package/modules/core/dist/calendar.d.ts.map +1 -0
- package/modules/core/dist/calendar.js +301 -0
- package/modules/core/dist/calendar.js.map +1 -0
- package/modules/core/dist/canonical-json.d.ts +63 -0
- package/modules/core/dist/canonical-json.d.ts.map +1 -0
- package/modules/core/dist/canonical-json.js +241 -0
- package/modules/core/dist/canonical-json.js.map +1 -0
- package/modules/core/dist/computed.d.ts +31 -0
- package/modules/core/dist/computed.d.ts.map +1 -0
- package/modules/core/dist/computed.js +40 -0
- package/modules/core/dist/computed.js.map +1 -0
- package/modules/core/dist/contracts.d.ts +59 -0
- package/modules/core/dist/contracts.d.ts.map +1 -0
- package/modules/core/dist/contracts.js +9 -0
- package/modules/core/dist/contracts.js.map +1 -0
- package/modules/core/dist/dates.d.ts +31 -0
- package/modules/core/dist/dates.d.ts.map +1 -0
- package/modules/core/dist/dates.js +126 -0
- package/modules/core/dist/dates.js.map +1 -0
- package/modules/core/dist/diagnostics.d.ts +278 -0
- package/modules/core/dist/diagnostics.d.ts.map +1 -0
- package/modules/core/dist/diagnostics.js +287 -0
- package/modules/core/dist/diagnostics.js.map +1 -0
- package/modules/core/dist/errors.d.ts +324 -0
- package/modules/core/dist/errors.d.ts.map +1 -0
- package/modules/core/dist/errors.js +363 -0
- package/modules/core/dist/errors.js.map +1 -0
- package/modules/core/dist/facade.d.ts +97 -0
- package/modules/core/dist/facade.d.ts.map +1 -0
- package/modules/core/dist/facade.js +354 -0
- package/modules/core/dist/facade.js.map +1 -0
- package/modules/core/dist/index.d.ts +45 -0
- package/modules/core/dist/index.d.ts.map +1 -0
- package/modules/core/dist/index.js +23 -0
- package/modules/core/dist/index.js.map +1 -0
- package/modules/core/dist/invariants.d.ts +112 -0
- package/modules/core/dist/invariants.d.ts.map +1 -0
- package/modules/core/dist/invariants.js +240 -0
- package/modules/core/dist/invariants.js.map +1 -0
- package/modules/core/dist/market-data.d.ts +219 -0
- package/modules/core/dist/market-data.d.ts.map +1 -0
- package/modules/core/dist/market-data.js +183 -0
- package/modules/core/dist/market-data.js.map +1 -0
- package/modules/core/dist/numeric.d.ts +46 -0
- package/modules/core/dist/numeric.d.ts.map +1 -0
- package/modules/core/dist/numeric.js +145 -0
- package/modules/core/dist/numeric.js.map +1 -0
- package/modules/core/dist/orders.d.ts +28 -0
- package/modules/core/dist/orders.d.ts.map +1 -0
- package/modules/core/dist/orders.js +49 -0
- package/modules/core/dist/orders.js.map +1 -0
- package/modules/core/dist/pricing.d.ts +418 -0
- package/modules/core/dist/pricing.d.ts.map +1 -0
- package/modules/core/dist/pricing.js +987 -0
- package/modules/core/dist/pricing.js.map +1 -0
- package/modules/core/dist/provenance.d.ts +25 -0
- package/modules/core/dist/provenance.d.ts.map +1 -0
- package/modules/core/dist/provenance.js +75 -0
- package/modules/core/dist/provenance.js.map +1 -0
- package/modules/core/dist/schema/index.d.ts +14 -0
- package/modules/core/dist/schema/index.d.ts.map +1 -0
- package/modules/core/dist/schema/index.js +12 -0
- package/modules/core/dist/schema/index.js.map +1 -0
- package/modules/core/dist/schema/json-schema-guard.d.ts +21 -0
- package/modules/core/dist/schema/json-schema-guard.d.ts.map +1 -0
- package/modules/core/dist/schema/json-schema-guard.js +114 -0
- package/modules/core/dist/schema/json-schema-guard.js.map +1 -0
- package/modules/core/dist/schema/json-schema.d.ts +33 -0
- package/modules/core/dist/schema/json-schema.d.ts.map +1 -0
- package/modules/core/dist/schema/json-schema.js +3 -0
- package/modules/core/dist/schema/json-schema.js.map +1 -0
- package/modules/core/dist/schema/payloads.d.ts +429 -0
- package/modules/core/dist/schema/payloads.d.ts.map +1 -0
- package/modules/core/dist/schema/payloads.js +323 -0
- package/modules/core/dist/schema/payloads.js.map +1 -0
- package/modules/core/dist/schema/schema.d.ts +282 -0
- package/modules/core/dist/schema/schema.d.ts.map +1 -0
- package/modules/core/dist/schema/schema.js +780 -0
- package/modules/core/dist/schema/schema.js.map +1 -0
- package/modules/core/dist/schema/standard.d.ts +32 -0
- package/modules/core/dist/schema/standard.d.ts.map +1 -0
- package/modules/core/dist/schema/standard.js +8 -0
- package/modules/core/dist/schema/standard.js.map +1 -0
- package/modules/core/dist/symbology.d.ts +30 -0
- package/modules/core/dist/symbology.d.ts.map +1 -0
- package/modules/core/dist/symbology.js +126 -0
- package/modules/core/dist/symbology.js.map +1 -0
- package/modules/core/dist/time.d.ts +122 -0
- package/modules/core/dist/time.d.ts.map +1 -0
- package/modules/core/dist/time.js +349 -0
- package/modules/core/dist/time.js.map +1 -0
- package/modules/core/dist/validation-codes.d.ts +24 -0
- package/modules/core/dist/validation-codes.d.ts.map +1 -0
- package/modules/core/dist/validation-codes.js +24 -0
- package/modules/core/dist/validation-codes.js.map +1 -0
- package/modules/core/dist/validation.d.ts +117 -0
- package/modules/core/dist/validation.d.ts.map +1 -0
- package/modules/core/dist/validation.js +415 -0
- package/modules/core/dist/validation.js.map +1 -0
- package/modules/core/etc/core.api.md +157 -0
- package/modules/core/src/artifacts/analysis-artifact.ts +515 -0
- package/modules/core/src/artifacts/calculation-comparison.ts +641 -0
- package/modules/core/src/artifacts/canonical-scan.ts +358 -0
- package/modules/core/src/artifacts/comparison.ts +586 -0
- package/modules/core/src/artifacts/content-hash.ts +183 -0
- package/modules/core/src/artifacts/deep-freeze.ts +15 -0
- package/modules/core/src/artifacts/fitted-model-kit.ts +402 -0
- package/modules/core/src/artifacts/fitted-model-summary.ts +478 -0
- package/modules/core/src/artifacts/index.ts +155 -0
- package/modules/core/src/artifacts/market-snapshot.ts +787 -0
- package/modules/core/src/artifacts/migration.ts +195 -0
- package/modules/core/src/artifacts/numeric-comparison.ts +71 -0
- package/modules/core/src/artifacts/scenario-set.ts +383 -0
- package/modules/core/src/artifacts/table-handle.ts +329 -0
- package/modules/core/src/assumptions.ts +62 -0
- package/modules/core/src/calendar.ts +407 -0
- package/modules/core/src/canonical-json.ts +289 -0
- package/modules/core/src/computed.ts +55 -0
- package/modules/core/src/contracts.ts +63 -0
- package/modules/core/src/dates.ts +163 -0
- package/modules/core/src/diagnostics.ts +397 -0
- package/modules/core/src/errors.ts +404 -0
- package/modules/core/src/facade.ts +436 -0
- package/modules/core/src/index.ts +185 -0
- package/modules/core/src/invariants.ts +339 -0
- package/modules/core/src/market-data.ts +481 -0
- package/modules/core/src/numeric.ts +205 -0
- package/modules/core/src/orders.ts +71 -0
- package/modules/core/src/pricing.ts +1647 -0
- package/modules/core/src/provenance.ts +121 -0
- package/modules/core/src/schema/index.ts +61 -0
- package/modules/core/src/schema/json-schema-guard.ts +172 -0
- package/modules/core/src/schema/json-schema.ts +52 -0
- package/modules/core/src/schema/payloads.ts +364 -0
- package/modules/core/src/schema/schema.ts +986 -0
- package/modules/core/src/schema/standard.ts +40 -0
- package/modules/core/src/symbology.ts +170 -0
- package/modules/core/src/time.ts +458 -0
- package/modules/core/src/validation-codes.ts +23 -0
- package/modules/core/src/validation.ts +607 -0
- package/modules/crypto/dist/carry.d.ts +176 -0
- package/modules/crypto/dist/carry.d.ts.map +1 -0
- package/modules/crypto/dist/carry.js +349 -0
- package/modules/crypto/dist/carry.js.map +1 -0
- package/modules/crypto/dist/curve.d.ts +69 -0
- package/modules/crypto/dist/curve.d.ts.map +1 -0
- package/modules/crypto/dist/curve.js +180 -0
- package/modules/crypto/dist/curve.js.map +1 -0
- package/modules/crypto/dist/index.d.ts +20 -0
- package/modules/crypto/dist/index.d.ts.map +1 -0
- package/modules/crypto/dist/index.js +16 -0
- package/modules/crypto/dist/index.js.map +1 -0
- package/modules/crypto/dist/inverse.d.ts +61 -0
- package/modules/crypto/dist/inverse.d.ts.map +1 -0
- package/modules/crypto/dist/inverse.js +89 -0
- package/modules/crypto/dist/inverse.js.map +1 -0
- package/modules/crypto/dist/liquidation.d.ts +67 -0
- package/modules/crypto/dist/liquidation.d.ts.map +1 -0
- package/modules/crypto/dist/liquidation.js +103 -0
- package/modules/crypto/dist/liquidation.js.map +1 -0
- package/modules/crypto/etc/crypto.api.md +45 -0
- package/modules/crypto/src/carry.ts +656 -0
- package/modules/crypto/src/curve.ts +273 -0
- package/modules/crypto/src/index.ts +62 -0
- package/modules/crypto/src/inverse.ts +172 -0
- package/modules/crypto/src/liquidation.ts +174 -0
- package/modules/fixed-income/dist/artifacts.d.ts +24 -0
- package/modules/fixed-income/dist/artifacts.d.ts.map +1 -0
- package/modules/fixed-income/dist/artifacts.js +21 -0
- package/modules/fixed-income/dist/artifacts.js.map +1 -0
- package/modules/fixed-income/dist/bonds.d.ts +298 -0
- package/modules/fixed-income/dist/bonds.d.ts.map +1 -0
- package/modules/fixed-income/dist/bonds.js +951 -0
- package/modules/fixed-income/dist/bonds.js.map +1 -0
- package/modules/fixed-income/dist/conventions.d.ts +77 -0
- package/modules/fixed-income/dist/conventions.d.ts.map +1 -0
- package/modules/fixed-income/dist/conventions.js +266 -0
- package/modules/fixed-income/dist/conventions.js.map +1 -0
- package/modules/fixed-income/dist/convertible.d.ts +76 -0
- package/modules/fixed-income/dist/convertible.d.ts.map +1 -0
- package/modules/fixed-income/dist/convertible.js +182 -0
- package/modules/fixed-income/dist/convertible.js.map +1 -0
- package/modules/fixed-income/dist/credit.d.ts +227 -0
- package/modules/fixed-income/dist/credit.d.ts.map +1 -0
- package/modules/fixed-income/dist/credit.js +653 -0
- package/modules/fixed-income/dist/credit.js.map +1 -0
- package/modules/fixed-income/dist/cross-currency.d.ts +82 -0
- package/modules/fixed-income/dist/cross-currency.d.ts.map +1 -0
- package/modules/fixed-income/dist/cross-currency.js +93 -0
- package/modules/fixed-income/dist/cross-currency.js.map +1 -0
- package/modules/fixed-income/dist/curve-data.d.ts +70 -0
- package/modules/fixed-income/dist/curve-data.d.ts.map +1 -0
- package/modules/fixed-income/dist/curve-data.js +254 -0
- package/modules/fixed-income/dist/curve-data.js.map +1 -0
- package/modules/fixed-income/dist/curve-mappers.d.ts +57 -0
- package/modules/fixed-income/dist/curve-mappers.d.ts.map +1 -0
- package/modules/fixed-income/dist/curve-mappers.js +131 -0
- package/modules/fixed-income/dist/curve-mappers.js.map +1 -0
- package/modules/fixed-income/dist/curve-state.d.ts +47 -0
- package/modules/fixed-income/dist/curve-state.d.ts.map +1 -0
- package/modules/fixed-income/dist/curve-state.js +33 -0
- package/modules/fixed-income/dist/curve-state.js.map +1 -0
- package/modules/fixed-income/dist/curves.d.ts +198 -0
- package/modules/fixed-income/dist/curves.d.ts.map +1 -0
- package/modules/fixed-income/dist/curves.js +803 -0
- package/modules/fixed-income/dist/curves.js.map +1 -0
- package/modules/fixed-income/dist/fitted-model-artifacts.d.ts +277 -0
- package/modules/fixed-income/dist/fitted-model-artifacts.d.ts.map +1 -0
- package/modules/fixed-income/dist/fitted-model-artifacts.js +839 -0
- package/modules/fixed-income/dist/fitted-model-artifacts.js.map +1 -0
- package/modules/fixed-income/dist/fitted-model-families.d.ts +170 -0
- package/modules/fixed-income/dist/fitted-model-families.d.ts.map +1 -0
- package/modules/fixed-income/dist/fitted-model-families.js +461 -0
- package/modules/fixed-income/dist/fitted-model-families.js.map +1 -0
- package/modules/fixed-income/dist/futures.d.ts +264 -0
- package/modules/fixed-income/dist/futures.d.ts.map +1 -0
- package/modules/fixed-income/dist/futures.js +630 -0
- package/modules/fixed-income/dist/futures.js.map +1 -0
- package/modules/fixed-income/dist/generated/validation-specs.d.ts +12 -0
- package/modules/fixed-income/dist/generated/validation-specs.d.ts.map +1 -0
- package/modules/fixed-income/dist/generated/validation-specs.js +556 -0
- package/modules/fixed-income/dist/generated/validation-specs.js.map +1 -0
- package/modules/fixed-income/dist/index.d.ts +36 -0
- package/modules/fixed-income/dist/index.d.ts.map +1 -0
- package/modules/fixed-income/dist/index.js +37 -0
- package/modules/fixed-income/dist/index.js.map +1 -0
- package/modules/fixed-income/dist/inflation.d.ts +174 -0
- package/modules/fixed-income/dist/inflation.d.ts.map +1 -0
- package/modules/fixed-income/dist/inflation.js +335 -0
- package/modules/fixed-income/dist/inflation.js.map +1 -0
- package/modules/fixed-income/dist/lattice.d.ts +156 -0
- package/modules/fixed-income/dist/lattice.d.ts.map +1 -0
- package/modules/fixed-income/dist/lattice.js +433 -0
- package/modules/fixed-income/dist/lattice.js.map +1 -0
- package/modules/fixed-income/dist/models.d.ts +187 -0
- package/modules/fixed-income/dist/models.d.ts.map +1 -0
- package/modules/fixed-income/dist/models.js +580 -0
- package/modules/fixed-income/dist/models.js.map +1 -0
- package/modules/fixed-income/dist/pricer.d.ts +48 -0
- package/modules/fixed-income/dist/pricer.d.ts.map +1 -0
- package/modules/fixed-income/dist/pricer.js +445 -0
- package/modules/fixed-income/dist/pricer.js.map +1 -0
- package/modules/fixed-income/dist/rates.d.ts +305 -0
- package/modules/fixed-income/dist/rates.d.ts.map +1 -0
- package/modules/fixed-income/dist/rates.js +686 -0
- package/modules/fixed-income/dist/rates.js.map +1 -0
- package/modules/fixed-income/dist/validate.d.ts +28 -0
- package/modules/fixed-income/dist/validate.d.ts.map +1 -0
- package/modules/fixed-income/dist/validate.js +123 -0
- package/modules/fixed-income/dist/validate.js.map +1 -0
- package/modules/fixed-income/dist/xva.d.ts +88 -0
- package/modules/fixed-income/dist/xva.d.ts.map +1 -0
- package/modules/fixed-income/dist/xva.js +316 -0
- package/modules/fixed-income/dist/xva.js.map +1 -0
- package/modules/fixed-income/etc/fixed-income.api.md +195 -0
- package/modules/fixed-income/src/artifacts.ts +60 -0
- package/modules/fixed-income/src/bonds.ts +1514 -0
- package/modules/fixed-income/src/conventions.ts +387 -0
- package/modules/fixed-income/src/convertible.ts +286 -0
- package/modules/fixed-income/src/credit.ts +1065 -0
- package/modules/fixed-income/src/cross-currency.ts +176 -0
- package/modules/fixed-income/src/curve-data.ts +381 -0
- package/modules/fixed-income/src/curve-mappers.ts +170 -0
- package/modules/fixed-income/src/curve-state.ts +70 -0
- package/modules/fixed-income/src/curves.ts +1169 -0
- package/modules/fixed-income/src/fitted-model-artifacts.ts +1414 -0
- package/modules/fixed-income/src/fitted-model-families.ts +834 -0
- package/modules/fixed-income/src/futures.ts +1018 -0
- package/modules/fixed-income/src/generated/validation-specs.ts +559 -0
- package/modules/fixed-income/src/index.ts +241 -0
- package/modules/fixed-income/src/inflation.ts +554 -0
- package/modules/fixed-income/src/lattice.ts +675 -0
- package/modules/fixed-income/src/models.ts +897 -0
- package/modules/fixed-income/src/pricer.ts +624 -0
- package/modules/fixed-income/src/rates.ts +1086 -0
- package/modules/fixed-income/src/validate.ts +169 -0
- package/modules/fixed-income/src/xva.ts +466 -0
- package/modules/foreign-exchange/dist/exposure.d.ts +140 -0
- package/modules/foreign-exchange/dist/exposure.d.ts.map +1 -0
- package/modules/foreign-exchange/dist/exposure.js +253 -0
- package/modules/foreign-exchange/dist/exposure.js.map +1 -0
- package/modules/foreign-exchange/dist/forwards.d.ts +159 -0
- package/modules/foreign-exchange/dist/forwards.d.ts.map +1 -0
- package/modules/foreign-exchange/dist/forwards.js +310 -0
- package/modules/foreign-exchange/dist/forwards.js.map +1 -0
- package/modules/foreign-exchange/dist/index.d.ts +11 -0
- package/modules/foreign-exchange/dist/index.d.ts.map +1 -0
- package/modules/foreign-exchange/dist/index.js +11 -0
- package/modules/foreign-exchange/dist/index.js.map +1 -0
- package/modules/foreign-exchange/dist/internal.d.ts +6 -0
- package/modules/foreign-exchange/dist/internal.d.ts.map +1 -0
- package/modules/foreign-exchange/dist/internal.js +6 -0
- package/modules/foreign-exchange/dist/internal.js.map +1 -0
- package/modules/foreign-exchange/dist/spot.d.ts +150 -0
- package/modules/foreign-exchange/dist/spot.d.ts.map +1 -0
- package/modules/foreign-exchange/dist/spot.js +289 -0
- package/modules/foreign-exchange/dist/spot.js.map +1 -0
- package/modules/foreign-exchange/etc/foreign-exchange.api.md +52 -0
- package/modules/foreign-exchange/src/exposure.ts +485 -0
- package/modules/foreign-exchange/src/forwards.ts +595 -0
- package/modules/foreign-exchange/src/index.ts +11 -0
- package/modules/foreign-exchange/src/internal.ts +6 -0
- package/modules/foreign-exchange/src/spot.ts +530 -0
- package/modules/fundamentals/dist/analyze.d.ts +90 -0
- package/modules/fundamentals/dist/analyze.d.ts.map +1 -0
- package/modules/fundamentals/dist/analyze.js +293 -0
- package/modules/fundamentals/dist/analyze.js.map +1 -0
- package/modules/fundamentals/dist/index.d.ts +17 -0
- package/modules/fundamentals/dist/index.d.ts.map +1 -0
- package/modules/fundamentals/dist/index.js +15 -0
- package/modules/fundamentals/dist/index.js.map +1 -0
- package/modules/fundamentals/dist/periods.d.ts +47 -0
- package/modules/fundamentals/dist/periods.d.ts.map +1 -0
- package/modules/fundamentals/dist/periods.js +106 -0
- package/modules/fundamentals/dist/periods.js.map +1 -0
- package/modules/fundamentals/dist/ratio-heads.d.ts +47 -0
- package/modules/fundamentals/dist/ratio-heads.d.ts.map +1 -0
- package/modules/fundamentals/dist/ratio-heads.js +766 -0
- package/modules/fundamentals/dist/ratio-heads.js.map +1 -0
- package/modules/fundamentals/dist/ratio-internals.d.ts +187 -0
- package/modules/fundamentals/dist/ratio-internals.d.ts.map +1 -0
- package/modules/fundamentals/dist/ratio-internals.js +299 -0
- package/modules/fundamentals/dist/ratio-internals.js.map +1 -0
- package/modules/fundamentals/dist/ratios.d.ts +9 -0
- package/modules/fundamentals/dist/ratios.d.ts.map +1 -0
- package/modules/fundamentals/dist/ratios.js +8 -0
- package/modules/fundamentals/dist/ratios.js.map +1 -0
- package/modules/fundamentals/dist/score-heads.d.ts +130 -0
- package/modules/fundamentals/dist/score-heads.d.ts.map +1 -0
- package/modules/fundamentals/dist/score-heads.js +364 -0
- package/modules/fundamentals/dist/score-heads.js.map +1 -0
- package/modules/fundamentals/dist/scores.d.ts +6 -0
- package/modules/fundamentals/dist/scores.d.ts.map +1 -0
- package/modules/fundamentals/dist/scores.js +6 -0
- package/modules/fundamentals/dist/scores.js.map +1 -0
- package/modules/fundamentals/dist/statement-contracts.d.ts +170 -0
- package/modules/fundamentals/dist/statement-contracts.d.ts.map +1 -0
- package/modules/fundamentals/dist/statement-contracts.js +207 -0
- package/modules/fundamentals/dist/statement-contracts.js.map +1 -0
- package/modules/fundamentals/dist/statement-utilities.d.ts +190 -0
- package/modules/fundamentals/dist/statement-utilities.d.ts.map +1 -0
- package/modules/fundamentals/dist/statement-utilities.js +501 -0
- package/modules/fundamentals/dist/statement-utilities.js.map +1 -0
- package/modules/fundamentals/dist/statements.d.ts +8 -0
- package/modules/fundamentals/dist/statements.d.ts.map +1 -0
- package/modules/fundamentals/dist/statements.js +7 -0
- package/modules/fundamentals/dist/statements.js.map +1 -0
- package/modules/fundamentals/etc/fundamentals.api.md +110 -0
- package/modules/fundamentals/src/analyze.ts +401 -0
- package/modules/fundamentals/src/index.ts +24 -0
- package/modules/fundamentals/src/periods.ts +197 -0
- package/modules/fundamentals/src/ratio-heads.ts +945 -0
- package/modules/fundamentals/src/ratio-internals.ts +562 -0
- package/modules/fundamentals/src/ratios.ts +23 -0
- package/modules/fundamentals/src/score-heads.ts +651 -0
- package/modules/fundamentals/src/scores.ts +6 -0
- package/modules/fundamentals/src/statement-contracts.ts +393 -0
- package/modules/fundamentals/src/statement-utilities.ts +833 -0
- package/modules/fundamentals/src/statements.ts +22 -0
- package/modules/http/dist/bin.d.ts +7 -0
- package/modules/http/dist/bin.d.ts.map +1 -0
- package/modules/http/dist/bin.js +167 -0
- package/modules/http/dist/bin.js.map +1 -0
- package/modules/http/dist/index.d.ts +10 -0
- package/modules/http/dist/index.d.ts.map +1 -0
- package/modules/http/dist/index.js +8 -0
- package/modules/http/dist/index.js.map +1 -0
- package/modules/http/dist/openapi.d.ts +38 -0
- package/modules/http/dist/openapi.d.ts.map +1 -0
- package/modules/http/dist/openapi.js +431 -0
- package/modules/http/dist/openapi.js.map +1 -0
- package/modules/http/dist/security.d.ts +21 -0
- package/modules/http/dist/security.d.ts.map +1 -0
- package/modules/http/dist/security.js +116 -0
- package/modules/http/dist/security.js.map +1 -0
- package/modules/http/dist/server.d.ts +63 -0
- package/modules/http/dist/server.d.ts.map +1 -0
- package/modules/http/dist/server.js +544 -0
- package/modules/http/dist/server.js.map +1 -0
- package/modules/http/etc/http.api.md +15 -0
- package/modules/http/etc/openapi.json +51958 -0
- package/modules/http/src/bin.ts +190 -0
- package/modules/http/src/index.ts +10 -0
- package/modules/http/src/openapi.ts +488 -0
- package/modules/http/src/security.ts +158 -0
- package/modules/http/src/server.ts +941 -0
- package/modules/math/dist/bivariate.d.ts +17 -0
- package/modules/math/dist/bivariate.d.ts.map +1 -0
- package/modules/math/dist/bivariate.js +123 -0
- package/modules/math/dist/bivariate.js.map +1 -0
- package/modules/math/dist/distributions.d.ts +66 -0
- package/modules/math/dist/distributions.d.ts.map +1 -0
- package/modules/math/dist/distributions.js +465 -0
- package/modules/math/dist/distributions.js.map +1 -0
- package/modules/math/dist/filters.d.ts +96 -0
- package/modules/math/dist/filters.d.ts.map +1 -0
- package/modules/math/dist/filters.js +347 -0
- package/modules/math/dist/filters.js.map +1 -0
- package/modules/math/dist/index.d.ts +34 -0
- package/modules/math/dist/index.d.ts.map +1 -0
- package/modules/math/dist/index.js +23 -0
- package/modules/math/dist/index.js.map +1 -0
- package/modules/math/dist/integration.d.ts +58 -0
- package/modules/math/dist/integration.d.ts.map +1 -0
- package/modules/math/dist/integration.js +176 -0
- package/modules/math/dist/integration.js.map +1 -0
- package/modules/math/dist/interpolation.d.ts +57 -0
- package/modules/math/dist/interpolation.d.ts.map +1 -0
- package/modules/math/dist/interpolation.js +464 -0
- package/modules/math/dist/interpolation.js.map +1 -0
- package/modules/math/dist/linalg.d.ts +251 -0
- package/modules/math/dist/linalg.d.ts.map +1 -0
- package/modules/math/dist/linalg.js +1503 -0
- package/modules/math/dist/linalg.js.map +1 -0
- package/modules/math/dist/lowdiscrepancy.d.ts +21 -0
- package/modules/math/dist/lowdiscrepancy.d.ts.map +1 -0
- package/modules/math/dist/lowdiscrepancy.js +200 -0
- package/modules/math/dist/lowdiscrepancy.js.map +1 -0
- package/modules/math/dist/montecarlo.d.ts +58 -0
- package/modules/math/dist/montecarlo.d.ts.map +1 -0
- package/modules/math/dist/montecarlo.js +248 -0
- package/modules/math/dist/montecarlo.js.map +1 -0
- package/modules/math/dist/normal.d.ts +40 -0
- package/modules/math/dist/normal.d.ts.map +1 -0
- package/modules/math/dist/normal.js +157 -0
- package/modules/math/dist/normal.js.map +1 -0
- package/modules/math/dist/optimize.d.ts +83 -0
- package/modules/math/dist/optimize.d.ts.map +1 -0
- package/modules/math/dist/optimize.js +784 -0
- package/modules/math/dist/optimize.js.map +1 -0
- package/modules/math/dist/random.d.ts +76 -0
- package/modules/math/dist/random.d.ts.map +1 -0
- package/modules/math/dist/random.js +261 -0
- package/modules/math/dist/random.js.map +1 -0
- package/modules/math/dist/regression.d.ts +58 -0
- package/modules/math/dist/regression.d.ts.map +1 -0
- package/modules/math/dist/regression.js +283 -0
- package/modules/math/dist/regression.js.map +1 -0
- package/modules/math/dist/resource-validation.d.ts +18 -0
- package/modules/math/dist/resource-validation.d.ts.map +1 -0
- package/modules/math/dist/resource-validation.js +60 -0
- package/modules/math/dist/resource-validation.js.map +1 -0
- package/modules/math/dist/sobol-data.d.ts +36 -0
- package/modules/math/dist/sobol-data.d.ts.map +1 -0
- package/modules/math/dist/sobol-data.js +172 -0
- package/modules/math/dist/sobol-data.js.map +1 -0
- package/modules/math/dist/solvers.d.ts +90 -0
- package/modules/math/dist/solvers.d.ts.map +1 -0
- package/modules/math/dist/solvers.js +663 -0
- package/modules/math/dist/solvers.js.map +1 -0
- package/modules/math/dist/statistics-internal.d.ts +73 -0
- package/modules/math/dist/statistics-internal.d.ts.map +1 -0
- package/modules/math/dist/statistics-internal.js +217 -0
- package/modules/math/dist/statistics-internal.js.map +1 -0
- package/modules/math/dist/statistics.d.ts +113 -0
- package/modules/math/dist/statistics.d.ts.map +1 -0
- package/modules/math/dist/statistics.js +545 -0
- package/modules/math/dist/statistics.js.map +1 -0
- package/modules/math/dist/timeseries.d.ts +131 -0
- package/modules/math/dist/timeseries.d.ts.map +1 -0
- package/modules/math/dist/timeseries.js +502 -0
- package/modules/math/dist/timeseries.js.map +1 -0
- package/modules/math/etc/math.api.md +178 -0
- package/modules/math/src/bivariate.ts +124 -0
- package/modules/math/src/distributions.ts +481 -0
- package/modules/math/src/filters.ts +452 -0
- package/modules/math/src/index.ts +223 -0
- package/modules/math/src/integration.ts +259 -0
- package/modules/math/src/interpolation.ts +588 -0
- package/modules/math/src/linalg.ts +1892 -0
- package/modules/math/src/lowdiscrepancy.ts +241 -0
- package/modules/math/src/montecarlo.ts +326 -0
- package/modules/math/src/normal.ts +161 -0
- package/modules/math/src/optimize.ts +943 -0
- package/modules/math/src/random.ts +372 -0
- package/modules/math/src/regression.ts +340 -0
- package/modules/math/src/resource-validation.ts +79 -0
- package/modules/math/src/sobol-data.ts +187 -0
- package/modules/math/src/solvers.ts +859 -0
- package/modules/math/src/statistics-internal.ts +256 -0
- package/modules/math/src/statistics.ts +636 -0
- package/modules/math/src/timeseries.ts +611 -0
- package/modules/options/dist/american-iv.d.ts +116 -0
- package/modules/options/dist/american-iv.d.ts.map +1 -0
- package/modules/options/dist/american-iv.js +385 -0
- package/modules/options/dist/american-iv.js.map +1 -0
- package/modules/options/dist/arbitrage.d.ts +42 -0
- package/modules/options/dist/arbitrage.d.ts.map +1 -0
- package/modules/options/dist/arbitrage.js +79 -0
- package/modules/options/dist/arbitrage.js.map +1 -0
- package/modules/options/dist/bachelier.d.ts +68 -0
- package/modules/options/dist/bachelier.d.ts.map +1 -0
- package/modules/options/dist/bachelier.js +348 -0
- package/modules/options/dist/bachelier.js.map +1 -0
- package/modules/options/dist/batch.d.ts +82 -0
- package/modules/options/dist/batch.d.ts.map +1 -0
- package/modules/options/dist/batch.js +346 -0
- package/modules/options/dist/batch.js.map +1 -0
- package/modules/options/dist/black-scholes.d.ts +42 -0
- package/modules/options/dist/black-scholes.d.ts.map +1 -0
- package/modules/options/dist/black-scholes.js +334 -0
- package/modules/options/dist/black-scholes.js.map +1 -0
- package/modules/options/dist/black76.d.ts +77 -0
- package/modules/options/dist/black76.d.ts.map +1 -0
- package/modules/options/dist/black76.js +400 -0
- package/modules/options/dist/black76.js.map +1 -0
- package/modules/options/dist/bsm.d.ts +120 -0
- package/modules/options/dist/bsm.d.ts.map +1 -0
- package/modules/options/dist/bsm.js +414 -0
- package/modules/options/dist/bsm.js.map +1 -0
- package/modules/options/dist/chain-greeks.d.ts +69 -0
- package/modules/options/dist/chain-greeks.d.ts.map +1 -0
- package/modules/options/dist/chain-greeks.js +154 -0
- package/modules/options/dist/chain-greeks.js.map +1 -0
- package/modules/options/dist/chain-health.d.ts +254 -0
- package/modules/options/dist/chain-health.d.ts.map +1 -0
- package/modules/options/dist/chain-health.js +746 -0
- package/modules/options/dist/chain-health.js.map +1 -0
- package/modules/options/dist/contract.d.ts +73 -0
- package/modules/options/dist/contract.d.ts.map +1 -0
- package/modules/options/dist/contract.js +226 -0
- package/modules/options/dist/contract.js.map +1 -0
- package/modules/options/dist/dividend-term-structure.d.ts +76 -0
- package/modules/options/dist/dividend-term-structure.d.ts.map +1 -0
- package/modules/options/dist/dividend-term-structure.js +180 -0
- package/modules/options/dist/dividend-term-structure.js.map +1 -0
- package/modules/options/dist/dividends.d.ts +34 -0
- package/modules/options/dist/dividends.d.ts.map +1 -0
- package/modules/options/dist/dividends.js +51 -0
- package/modules/options/dist/dividends.js.map +1 -0
- package/modules/options/dist/engine-bsm.d.ts +22 -0
- package/modules/options/dist/engine-bsm.d.ts.map +1 -0
- package/modules/options/dist/engine-bsm.js +236 -0
- package/modules/options/dist/engine-bsm.js.map +1 -0
- package/modules/options/dist/engines/american-approx.d.ts +29 -0
- package/modules/options/dist/engines/american-approx.d.ts.map +1 -0
- package/modules/options/dist/engines/american-approx.js +483 -0
- package/modules/options/dist/engines/american-approx.js.map +1 -0
- package/modules/options/dist/engines/bounds.d.ts +49 -0
- package/modules/options/dist/engines/bounds.d.ts.map +1 -0
- package/modules/options/dist/engines/bounds.js +58 -0
- package/modules/options/dist/engines/bounds.js.map +1 -0
- package/modules/options/dist/engines/engine-factory.d.ts +92 -0
- package/modules/options/dist/engines/engine-factory.d.ts.map +1 -0
- package/modules/options/dist/engines/engine-factory.js +372 -0
- package/modules/options/dist/engines/engine-factory.js.map +1 -0
- package/modules/options/dist/engines/fd-greeks.d.ts +84 -0
- package/modules/options/dist/engines/fd-greeks.d.ts.map +1 -0
- package/modules/options/dist/engines/fd-greeks.js +343 -0
- package/modules/options/dist/engines/fd-greeks.js.map +1 -0
- package/modules/options/dist/engines/fdm.d.ts +78 -0
- package/modules/options/dist/engines/fdm.d.ts.map +1 -0
- package/modules/options/dist/engines/fdm.js +218 -0
- package/modules/options/dist/engines/fdm.js.map +1 -0
- package/modules/options/dist/engines/scalar-pricing.d.ts +24 -0
- package/modules/options/dist/engines/scalar-pricing.d.ts.map +1 -0
- package/modules/options/dist/engines/scalar-pricing.js +2 -0
- package/modules/options/dist/engines/scalar-pricing.js.map +1 -0
- package/modules/options/dist/engines/tree.d.ts +78 -0
- package/modules/options/dist/engines/tree.d.ts.map +1 -0
- package/modules/options/dist/engines/tree.js +247 -0
- package/modules/options/dist/engines/tree.js.map +1 -0
- package/modules/options/dist/engines.d.ts +272 -0
- package/modules/options/dist/engines.d.ts.map +1 -0
- package/modules/options/dist/engines.js +1309 -0
- package/modules/options/dist/engines.js.map +1 -0
- package/modules/options/dist/equity-lattice.d.ts +58 -0
- package/modules/options/dist/equity-lattice.d.ts.map +1 -0
- package/modules/options/dist/equity-lattice.js +139 -0
- package/modules/options/dist/equity-lattice.js.map +1 -0
- package/modules/options/dist/exercise.d.ts +80 -0
- package/modules/options/dist/exercise.d.ts.map +1 -0
- package/modules/options/dist/exercise.js +266 -0
- package/modules/options/dist/exercise.js.map +1 -0
- package/modules/options/dist/exotics.d.ts +640 -0
- package/modules/options/dist/exotics.d.ts.map +1 -0
- package/modules/options/dist/exotics.js +2880 -0
- package/modules/options/dist/exotics.js.map +1 -0
- package/modules/options/dist/facade-util.d.ts +51 -0
- package/modules/options/dist/facade-util.d.ts.map +1 -0
- package/modules/options/dist/facade-util.js +93 -0
- package/modules/options/dist/facade-util.js.map +1 -0
- package/modules/options/dist/generated/validation-specs.d.ts +12 -0
- package/modules/options/dist/generated/validation-specs.d.ts.map +1 -0
- package/modules/options/dist/generated/validation-specs.js +2616 -0
- package/modules/options/dist/generated/validation-specs.js.map +1 -0
- package/modules/options/dist/heston.d.ts +160 -0
- package/modules/options/dist/heston.d.ts.map +1 -0
- package/modules/options/dist/heston.js +983 -0
- package/modules/options/dist/heston.js.map +1 -0
- package/modules/options/dist/index.d.ts +65 -0
- package/modules/options/dist/index.d.ts.map +1 -0
- package/modules/options/dist/index.js +58 -0
- package/modules/options/dist/index.js.map +1 -0
- package/modules/options/dist/iv.d.ts +85 -0
- package/modules/options/dist/iv.d.ts.map +1 -0
- package/modules/options/dist/iv.js +424 -0
- package/modules/options/dist/iv.js.map +1 -0
- package/modules/options/dist/lattice.d.ts +7 -0
- package/modules/options/dist/lattice.d.ts.map +1 -0
- package/modules/options/dist/lattice.js +7 -0
- package/modules/options/dist/lattice.js.map +1 -0
- package/modules/options/dist/local-volatility.d.ts +128 -0
- package/modules/options/dist/local-volatility.d.ts.map +1 -0
- package/modules/options/dist/local-volatility.js +333 -0
- package/modules/options/dist/local-volatility.js.map +1 -0
- package/modules/options/dist/market.d.ts +19 -0
- package/modules/options/dist/market.d.ts.map +1 -0
- package/modules/options/dist/market.js +58 -0
- package/modules/options/dist/market.js.map +1 -0
- package/modules/options/dist/mc/complex.d.ts +23 -0
- package/modules/options/dist/mc/complex.d.ts.map +1 -0
- package/modules/options/dist/mc/complex.js +42 -0
- package/modules/options/dist/mc/complex.js.map +1 -0
- package/modules/options/dist/mc/core.d.ts +151 -0
- package/modules/options/dist/mc/core.d.ts.map +1 -0
- package/modules/options/dist/mc/core.js +319 -0
- package/modules/options/dist/mc/core.js.map +1 -0
- package/modules/options/dist/monte-carlo.d.ts +66 -0
- package/modules/options/dist/monte-carlo.d.ts.map +1 -0
- package/modules/options/dist/monte-carlo.js +388 -0
- package/modules/options/dist/monte-carlo.js.map +1 -0
- package/modules/options/dist/parity.d.ts +191 -0
- package/modules/options/dist/parity.d.ts.map +1 -0
- package/modules/options/dist/parity.js +566 -0
- package/modules/options/dist/parity.js.map +1 -0
- package/modules/options/dist/payoff-kernel.d.ts +33 -0
- package/modules/options/dist/payoff-kernel.d.ts.map +1 -0
- package/modules/options/dist/payoff-kernel.js +27 -0
- package/modules/options/dist/payoff-kernel.js.map +1 -0
- package/modules/options/dist/payoff.d.ts +34 -0
- package/modules/options/dist/payoff.d.ts.map +1 -0
- package/modules/options/dist/payoff.js +60 -0
- package/modules/options/dist/payoff.js.map +1 -0
- package/modules/options/dist/pricer.d.ts +44 -0
- package/modules/options/dist/pricer.d.ts.map +1 -0
- package/modules/options/dist/pricer.js +179 -0
- package/modules/options/dist/pricer.js.map +1 -0
- package/modules/options/dist/pro.d.ts +82 -0
- package/modules/options/dist/pro.d.ts.map +1 -0
- package/modules/options/dist/pro.js +177 -0
- package/modules/options/dist/pro.js.map +1 -0
- package/modules/options/dist/quote.d.ts +18 -0
- package/modules/options/dist/quote.d.ts.map +1 -0
- package/modules/options/dist/quote.js +26 -0
- package/modules/options/dist/quote.js.map +1 -0
- package/modules/options/dist/resource-validation-internal.d.ts +8 -0
- package/modules/options/dist/resource-validation-internal.d.ts.map +1 -0
- package/modules/options/dist/resource-validation-internal.js +23 -0
- package/modules/options/dist/resource-validation-internal.js.map +1 -0
- package/modules/options/dist/sabr.d.ts +153 -0
- package/modules/options/dist/sabr.d.ts.map +1 -0
- package/modules/options/dist/sabr.js +515 -0
- package/modules/options/dist/sabr.js.map +1 -0
- package/modules/options/dist/schema.d.ts +120 -0
- package/modules/options/dist/schema.d.ts.map +1 -0
- package/modules/options/dist/schema.js +62 -0
- package/modules/options/dist/schema.js.map +1 -0
- package/modules/options/dist/time.d.ts +44 -0
- package/modules/options/dist/time.d.ts.map +1 -0
- package/modules/options/dist/time.js +76 -0
- package/modules/options/dist/time.js.map +1 -0
- package/modules/options/dist/types.d.ts +115 -0
- package/modules/options/dist/types.d.ts.map +1 -0
- package/modules/options/dist/types.js +3 -0
- package/modules/options/dist/types.js.map +1 -0
- package/modules/options/etc/options.api.md +230 -0
- package/modules/options/src/american-iv.ts +547 -0
- package/modules/options/src/arbitrage.ts +134 -0
- package/modules/options/src/bachelier.ts +515 -0
- package/modules/options/src/batch.ts +496 -0
- package/modules/options/src/black-scholes.ts +501 -0
- package/modules/options/src/black76.ts +573 -0
- package/modules/options/src/bsm.ts +575 -0
- package/modules/options/src/chain-greeks.ts +242 -0
- package/modules/options/src/chain-health.ts +1083 -0
- package/modules/options/src/contract.ts +329 -0
- package/modules/options/src/dividend-term-structure.ts +303 -0
- package/modules/options/src/dividends.ts +75 -0
- package/modules/options/src/engine-bsm.ts +306 -0
- package/modules/options/src/engines/american-approx.ts +669 -0
- package/modules/options/src/engines/bounds.ts +106 -0
- package/modules/options/src/engines/engine-factory.ts +502 -0
- package/modules/options/src/engines/fd-greeks.ts +426 -0
- package/modules/options/src/engines/fdm.ts +302 -0
- package/modules/options/src/engines/scalar-pricing.ts +27 -0
- package/modules/options/src/engines/tree.ts +350 -0
- package/modules/options/src/engines.ts +1845 -0
- package/modules/options/src/equity-lattice.ts +224 -0
- package/modules/options/src/exercise.ts +422 -0
- package/modules/options/src/exotics.ts +3966 -0
- package/modules/options/src/facade-util.ts +137 -0
- package/modules/options/src/generated/validation-specs.ts +2621 -0
- package/modules/options/src/heston.ts +1348 -0
- package/modules/options/src/index.ts +325 -0
- package/modules/options/src/iv.ts +591 -0
- package/modules/options/src/lattice.ts +6 -0
- package/modules/options/src/local-volatility.ts +493 -0
- package/modules/options/src/market.ts +74 -0
- package/modules/options/src/mc/complex.ts +55 -0
- package/modules/options/src/mc/core.ts +538 -0
- package/modules/options/src/monte-carlo.ts +567 -0
- package/modules/options/src/parity.ts +928 -0
- package/modules/options/src/payoff-kernel.ts +39 -0
- package/modules/options/src/payoff.ts +81 -0
- package/modules/options/src/pricer.ts +217 -0
- package/modules/options/src/pro.ts +272 -0
- package/modules/options/src/quote.ts +34 -0
- package/modules/options/src/resource-validation-internal.ts +31 -0
- package/modules/options/src/sabr.ts +716 -0
- package/modules/options/src/schema.ts +73 -0
- package/modules/options/src/time.ts +104 -0
- package/modules/options/src/types.ts +124 -0
- package/modules/performance/dist/activity.d.ts +24 -0
- package/modules/performance/dist/activity.d.ts.map +1 -0
- package/modules/performance/dist/activity.js +137 -0
- package/modules/performance/dist/activity.js.map +1 -0
- package/modules/performance/dist/analyze.d.ts +85 -0
- package/modules/performance/dist/analyze.d.ts.map +1 -0
- package/modules/performance/dist/analyze.js +203 -0
- package/modules/performance/dist/analyze.js.map +1 -0
- package/modules/performance/dist/annualization-internal.d.ts +21 -0
- package/modules/performance/dist/annualization-internal.d.ts.map +1 -0
- package/modules/performance/dist/annualization-internal.js +34 -0
- package/modules/performance/dist/annualization-internal.js.map +1 -0
- package/modules/performance/dist/drawdown.d.ts +34 -0
- package/modules/performance/dist/drawdown.d.ts.map +1 -0
- package/modules/performance/dist/drawdown.js +99 -0
- package/modules/performance/dist/drawdown.js.map +1 -0
- package/modules/performance/dist/flow-aware.d.ts +388 -0
- package/modules/performance/dist/flow-aware.d.ts.map +1 -0
- package/modules/performance/dist/flow-aware.js +888 -0
- package/modules/performance/dist/flow-aware.js.map +1 -0
- package/modules/performance/dist/index.d.ts +26 -0
- package/modules/performance/dist/index.d.ts.map +1 -0
- package/modules/performance/dist/index.js +25 -0
- package/modules/performance/dist/index.js.map +1 -0
- package/modules/performance/dist/metrics.d.ts +13 -0
- package/modules/performance/dist/metrics.d.ts.map +1 -0
- package/modules/performance/dist/metrics.js +87 -0
- package/modules/performance/dist/metrics.js.map +1 -0
- package/modules/performance/dist/ratios.d.ts +55 -0
- package/modules/performance/dist/ratios.d.ts.map +1 -0
- package/modules/performance/dist/ratios.js +168 -0
- package/modules/performance/dist/ratios.js.map +1 -0
- package/modules/performance/dist/relative.d.ts +33 -0
- package/modules/performance/dist/relative.d.ts.map +1 -0
- package/modules/performance/dist/relative.js +150 -0
- package/modules/performance/dist/relative.js.map +1 -0
- package/modules/performance/dist/returns.d.ts +18 -0
- package/modules/performance/dist/returns.d.ts.map +1 -0
- package/modules/performance/dist/returns.js +70 -0
- package/modules/performance/dist/returns.js.map +1 -0
- package/modules/performance/dist/rolling.d.ts +36 -0
- package/modules/performance/dist/rolling.d.ts.map +1 -0
- package/modules/performance/dist/rolling.js +102 -0
- package/modules/performance/dist/rolling.js.map +1 -0
- package/modules/performance/dist/sector-performance-internal.d.ts +61 -0
- package/modules/performance/dist/sector-performance-internal.d.ts.map +1 -0
- package/modules/performance/dist/sector-performance-internal.js +216 -0
- package/modules/performance/dist/sector-performance-internal.js.map +1 -0
- package/modules/performance/dist/sector-performance.d.ts +288 -0
- package/modules/performance/dist/sector-performance.d.ts.map +1 -0
- package/modules/performance/dist/sector-performance.js +690 -0
- package/modules/performance/dist/sector-performance.js.map +1 -0
- package/modules/performance/dist/sharpe.d.ts +74 -0
- package/modules/performance/dist/sharpe.d.ts.map +1 -0
- package/modules/performance/dist/sharpe.js +157 -0
- package/modules/performance/dist/sharpe.js.map +1 -0
- package/modules/performance/etc/performance.api.md +109 -0
- package/modules/performance/src/activity.ts +182 -0
- package/modules/performance/src/analyze.ts +305 -0
- package/modules/performance/src/annualization-internal.ts +43 -0
- package/modules/performance/src/drawdown.ts +132 -0
- package/modules/performance/src/flow-aware.ts +1518 -0
- package/modules/performance/src/index.ts +89 -0
- package/modules/performance/src/metrics.ts +150 -0
- package/modules/performance/src/ratios.ts +243 -0
- package/modules/performance/src/relative.ts +278 -0
- package/modules/performance/src/returns.ts +80 -0
- package/modules/performance/src/rolling.ts +155 -0
- package/modules/performance/src/sector-performance-internal.ts +293 -0
- package/modules/performance/src/sector-performance.ts +1263 -0
- package/modules/performance/src/sharpe.ts +256 -0
- package/modules/portfolio/dist/allocation.d.ts +227 -0
- package/modules/portfolio/dist/allocation.d.ts.map +1 -0
- package/modules/portfolio/dist/allocation.js +545 -0
- package/modules/portfolio/dist/allocation.js.map +1 -0
- package/modules/portfolio/dist/events.d.ts +502 -0
- package/modules/portfolio/dist/events.d.ts.map +1 -0
- package/modules/portfolio/dist/events.js +1061 -0
- package/modules/portfolio/dist/events.js.map +1 -0
- package/modules/portfolio/dist/index.d.ts +47 -0
- package/modules/portfolio/dist/index.d.ts.map +1 -0
- package/modules/portfolio/dist/index.js +34 -0
- package/modules/portfolio/dist/index.js.map +1 -0
- package/modules/portfolio/dist/internal.d.ts +101 -0
- package/modules/portfolio/dist/internal.d.ts.map +1 -0
- package/modules/portfolio/dist/internal.js +356 -0
- package/modules/portfolio/dist/internal.js.map +1 -0
- package/modules/portfolio/dist/ledger.d.ts +129 -0
- package/modules/portfolio/dist/ledger.d.ts.map +1 -0
- package/modules/portfolio/dist/ledger.js +271 -0
- package/modules/portfolio/dist/ledger.js.map +1 -0
- package/modules/portfolio/dist/lifecycle-corporate.d.ts +49 -0
- package/modules/portfolio/dist/lifecycle-corporate.d.ts.map +1 -0
- package/modules/portfolio/dist/lifecycle-corporate.js +462 -0
- package/modules/portfolio/dist/lifecycle-corporate.js.map +1 -0
- package/modules/portfolio/dist/lifecycle-derivatives.d.ts +59 -0
- package/modules/portfolio/dist/lifecycle-derivatives.d.ts.map +1 -0
- package/modules/portfolio/dist/lifecycle-derivatives.js +422 -0
- package/modules/portfolio/dist/lifecycle-derivatives.js.map +1 -0
- package/modules/portfolio/dist/marks.d.ts +44 -0
- package/modules/portfolio/dist/marks.d.ts.map +1 -0
- package/modules/portfolio/dist/marks.js +81 -0
- package/modules/portfolio/dist/marks.js.map +1 -0
- package/modules/portfolio/dist/monitor.d.ts +222 -0
- package/modules/portfolio/dist/monitor.d.ts.map +1 -0
- package/modules/portfolio/dist/monitor.js +1806 -0
- package/modules/portfolio/dist/monitor.js.map +1 -0
- package/modules/portfolio/dist/performance.d.ts +78 -0
- package/modules/portfolio/dist/performance.d.ts.map +1 -0
- package/modules/portfolio/dist/performance.js +146 -0
- package/modules/portfolio/dist/performance.js.map +1 -0
- package/modules/portfolio/dist/pnl.d.ts +154 -0
- package/modules/portfolio/dist/pnl.d.ts.map +1 -0
- package/modules/portfolio/dist/pnl.js +548 -0
- package/modules/portfolio/dist/pnl.js.map +1 -0
- package/modules/portfolio/dist/policy-grammar.d.ts +358 -0
- package/modules/portfolio/dist/policy-grammar.d.ts.map +1 -0
- package/modules/portfolio/dist/policy-grammar.js +1198 -0
- package/modules/portfolio/dist/policy-grammar.js.map +1 -0
- package/modules/portfolio/dist/policy.d.ts +24 -0
- package/modules/portfolio/dist/policy.d.ts.map +1 -0
- package/modules/portfolio/dist/policy.js +20 -0
- package/modules/portfolio/dist/policy.js.map +1 -0
- package/modules/portfolio/dist/rebalance.d.ts +281 -0
- package/modules/portfolio/dist/rebalance.d.ts.map +1 -0
- package/modules/portfolio/dist/rebalance.js +1236 -0
- package/modules/portfolio/dist/rebalance.js.map +1 -0
- package/modules/portfolio/dist/reconciliation.d.ts +150 -0
- package/modules/portfolio/dist/reconciliation.d.ts.map +1 -0
- package/modules/portfolio/dist/reconciliation.js +392 -0
- package/modules/portfolio/dist/reconciliation.js.map +1 -0
- package/modules/portfolio/dist/reducer-kernel.d.ts +92 -0
- package/modules/portfolio/dist/reducer-kernel.d.ts.map +1 -0
- package/modules/portfolio/dist/reducer-kernel.js +320 -0
- package/modules/portfolio/dist/reducer-kernel.js.map +1 -0
- package/modules/portfolio/dist/snapshot.d.ts +128 -0
- package/modules/portfolio/dist/snapshot.d.ts.map +1 -0
- package/modules/portfolio/dist/snapshot.js +205 -0
- package/modules/portfolio/dist/snapshot.js.map +1 -0
- package/modules/portfolio/dist/state.d.ts +196 -0
- package/modules/portfolio/dist/state.d.ts.map +1 -0
- package/modules/portfolio/dist/state.js +1093 -0
- package/modules/portfolio/dist/state.js.map +1 -0
- package/modules/portfolio/dist/timeline.d.ts +107 -0
- package/modules/portfolio/dist/timeline.d.ts.map +1 -0
- package/modules/portfolio/dist/timeline.js +220 -0
- package/modules/portfolio/dist/timeline.js.map +1 -0
- package/modules/portfolio/dist/trade/grant.d.ts +21 -0
- package/modules/portfolio/dist/trade/grant.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/grant.js +411 -0
- package/modules/portfolio/dist/trade/grant.js.map +1 -0
- package/modules/portfolio/dist/trade/index.d.ts +20 -0
- package/modules/portfolio/dist/trade/index.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/index.js +17 -0
- package/modules/portfolio/dist/trade/index.js.map +1 -0
- package/modules/portfolio/dist/trade/journal.d.ts +23 -0
- package/modules/portfolio/dist/trade/journal.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/journal.js +352 -0
- package/modules/portfolio/dist/trade/journal.js.map +1 -0
- package/modules/portfolio/dist/trade/plan.d.ts +25 -0
- package/modules/portfolio/dist/trade/plan.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/plan.js +285 -0
- package/modules/portfolio/dist/trade/plan.js.map +1 -0
- package/modules/portfolio/dist/trade/policy.d.ts +5 -0
- package/modules/portfolio/dist/trade/policy.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/policy.js +133 -0
- package/modules/portfolio/dist/trade/policy.js.map +1 -0
- package/modules/portfolio/dist/trade/preflight.d.ts +3 -0
- package/modules/portfolio/dist/trade/preflight.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/preflight.js +381 -0
- package/modules/portfolio/dist/trade/preflight.js.map +1 -0
- package/modules/portfolio/dist/trade/reconcile.d.ts +8 -0
- package/modules/portfolio/dist/trade/reconcile.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/reconcile.js +240 -0
- package/modules/portfolio/dist/trade/reconcile.js.map +1 -0
- package/modules/portfolio/dist/trade/types.d.ts +559 -0
- package/modules/portfolio/dist/trade/types.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/types.js +36 -0
- package/modules/portfolio/dist/trade/types.js.map +1 -0
- package/modules/portfolio/dist/trade/validate.d.ts +36 -0
- package/modules/portfolio/dist/trade/validate.d.ts.map +1 -0
- package/modules/portfolio/dist/trade/validate.js +776 -0
- package/modules/portfolio/dist/trade/validate.js.map +1 -0
- package/modules/portfolio/etc/portfolio.api.md +236 -0
- package/modules/portfolio/src/allocation.ts +844 -0
- package/modules/portfolio/src/events.ts +1968 -0
- package/modules/portfolio/src/index.ts +295 -0
- package/modules/portfolio/src/internal.ts +523 -0
- package/modules/portfolio/src/ledger.ts +420 -0
- package/modules/portfolio/src/lifecycle-corporate.ts +888 -0
- package/modules/portfolio/src/lifecycle-derivatives.ts +735 -0
- package/modules/portfolio/src/marks.ts +140 -0
- package/modules/portfolio/src/monitor.ts +2421 -0
- package/modules/portfolio/src/performance.ts +237 -0
- package/modules/portfolio/src/pnl.ts +840 -0
- package/modules/portfolio/src/policy-grammar.ts +1891 -0
- package/modules/portfolio/src/policy.ts +119 -0
- package/modules/portfolio/src/rebalance.ts +1742 -0
- package/modules/portfolio/src/reconciliation.ts +621 -0
- package/modules/portfolio/src/reducer-kernel.ts +512 -0
- package/modules/portfolio/src/snapshot.ts +372 -0
- package/modules/portfolio/src/state.ts +1776 -0
- package/modules/portfolio/src/timeline.ts +359 -0
- package/modules/portfolio/src/trade/grant.ts +514 -0
- package/modules/portfolio/src/trade/index.ts +96 -0
- package/modules/portfolio/src/trade/journal.ts +432 -0
- package/modules/portfolio/src/trade/plan.ts +424 -0
- package/modules/portfolio/src/trade/policy.ts +153 -0
- package/modules/portfolio/src/trade/preflight.ts +605 -0
- package/modules/portfolio/src/trade/reconcile.ts +276 -0
- package/modules/portfolio/src/trade/types.ts +637 -0
- package/modules/portfolio/src/trade/validate.ts +1213 -0
- package/modules/research/dist/artifacts.d.ts +25 -0
- package/modules/research/dist/artifacts.d.ts.map +1 -0
- package/modules/research/dist/artifacts.js +22 -0
- package/modules/research/dist/artifacts.js.map +1 -0
- package/modules/research/dist/events.d.ts +238 -0
- package/modules/research/dist/events.d.ts.map +1 -0
- package/modules/research/dist/events.js +844 -0
- package/modules/research/dist/events.js.map +1 -0
- package/modules/research/dist/factors.d.ts +330 -0
- package/modules/research/dist/factors.d.ts.map +1 -0
- package/modules/research/dist/factors.js +891 -0
- package/modules/research/dist/factors.js.map +1 -0
- package/modules/research/dist/index.d.ts +11 -0
- package/modules/research/dist/index.d.ts.map +1 -0
- package/modules/research/dist/index.js +13 -0
- package/modules/research/dist/index.js.map +1 -0
- package/modules/research/dist/observations.d.ts +77 -0
- package/modules/research/dist/observations.d.ts.map +1 -0
- package/modules/research/dist/observations.js +201 -0
- package/modules/research/dist/observations.js.map +1 -0
- package/modules/research/dist/point-in-time.d.ts +17 -0
- package/modules/research/dist/point-in-time.d.ts.map +1 -0
- package/modules/research/dist/point-in-time.js +34 -0
- package/modules/research/dist/point-in-time.js.map +1 -0
- package/modules/research/dist/research-hygiene.d.ts +126 -0
- package/modules/research/dist/research-hygiene.d.ts.map +1 -0
- package/modules/research/dist/research-hygiene.js +290 -0
- package/modules/research/dist/research-hygiene.js.map +1 -0
- package/modules/research/dist/research-run-artifacts.d.ts +315 -0
- package/modules/research/dist/research-run-artifacts.d.ts.map +1 -0
- package/modules/research/dist/research-run-artifacts.js +766 -0
- package/modules/research/dist/research-run-artifacts.js.map +1 -0
- package/modules/research/dist/research-run-kinds.d.ts +135 -0
- package/modules/research/dist/research-run-kinds.d.ts.map +1 -0
- package/modules/research/dist/research-run-kinds.js +470 -0
- package/modules/research/dist/research-run-kinds.js.map +1 -0
- package/modules/research/dist/screening.d.ts +215 -0
- package/modules/research/dist/screening.d.ts.map +1 -0
- package/modules/research/dist/screening.js +616 -0
- package/modules/research/dist/screening.js.map +1 -0
- package/modules/research/dist/universe.d.ts +131 -0
- package/modules/research/dist/universe.d.ts.map +1 -0
- package/modules/research/dist/universe.js +294 -0
- package/modules/research/dist/universe.js.map +1 -0
- package/modules/research/etc/research.api.md +109 -0
- package/modules/research/src/artifacts.ts +68 -0
- package/modules/research/src/events.ts +1358 -0
- package/modules/research/src/factors.ts +1322 -0
- package/modules/research/src/index.ts +28 -0
- package/modules/research/src/observations.ts +360 -0
- package/modules/research/src/point-in-time.ts +44 -0
- package/modules/research/src/research-hygiene.ts +544 -0
- package/modules/research/src/research-run-artifacts.ts +1464 -0
- package/modules/research/src/research-run-kinds.ts +723 -0
- package/modules/research/src/screening.ts +957 -0
- package/modules/research/src/universe.ts +494 -0
- package/modules/risk/dist/attribution.d.ts +166 -0
- package/modules/risk/dist/attribution.d.ts.map +1 -0
- package/modules/risk/dist/attribution.js +278 -0
- package/modules/risk/dist/attribution.js.map +1 -0
- package/modules/risk/dist/book-var.d.ts +113 -0
- package/modules/risk/dist/book-var.d.ts.map +1 -0
- package/modules/risk/dist/book-var.js +487 -0
- package/modules/risk/dist/book-var.js.map +1 -0
- package/modules/risk/dist/book.d.ts +95 -0
- package/modules/risk/dist/book.d.ts.map +1 -0
- package/modules/risk/dist/book.js +201 -0
- package/modules/risk/dist/book.js.map +1 -0
- package/modules/risk/dist/covariance.d.ts +96 -0
- package/modules/risk/dist/covariance.d.ts.map +1 -0
- package/modules/risk/dist/covariance.js +183 -0
- package/modules/risk/dist/covariance.js.map +1 -0
- package/modules/risk/dist/evt.d.ts +188 -0
- package/modules/risk/dist/evt.d.ts.map +1 -0
- package/modules/risk/dist/evt.js +625 -0
- package/modules/risk/dist/evt.js.map +1 -0
- package/modules/risk/dist/expected-returns.d.ts +139 -0
- package/modules/risk/dist/expected-returns.d.ts.map +1 -0
- package/modules/risk/dist/expected-returns.js +350 -0
- package/modules/risk/dist/expected-returns.js.map +1 -0
- package/modules/risk/dist/factor.d.ts +66 -0
- package/modules/risk/dist/factor.d.ts.map +1 -0
- package/modules/risk/dist/factor.js +133 -0
- package/modules/risk/dist/factor.js.map +1 -0
- package/modules/risk/dist/frontier.d.ts +158 -0
- package/modules/risk/dist/frontier.d.ts.map +1 -0
- package/modules/risk/dist/frontier.js +1183 -0
- package/modules/risk/dist/frontier.js.map +1 -0
- package/modules/risk/dist/index.d.ts +47 -0
- package/modules/risk/dist/index.d.ts.map +1 -0
- package/modules/risk/dist/index.js +43 -0
- package/modules/risk/dist/index.js.map +1 -0
- package/modules/risk/dist/input-description.d.ts +3 -0
- package/modules/risk/dist/input-description.d.ts.map +1 -0
- package/modules/risk/dist/input-description.js +24 -0
- package/modules/risk/dist/input-description.js.map +1 -0
- package/modules/risk/dist/kelly.d.ts +217 -0
- package/modules/risk/dist/kelly.d.ts.map +1 -0
- package/modules/risk/dist/kelly.js +731 -0
- package/modules/risk/dist/kelly.js.map +1 -0
- package/modules/risk/dist/linalg.d.ts +27 -0
- package/modules/risk/dist/linalg.d.ts.map +1 -0
- package/modules/risk/dist/linalg.js +89 -0
- package/modules/risk/dist/linalg.js.map +1 -0
- package/modules/risk/dist/numeric-vector.d.ts +9 -0
- package/modules/risk/dist/numeric-vector.d.ts.map +1 -0
- package/modules/risk/dist/numeric-vector.js +112 -0
- package/modules/risk/dist/numeric-vector.js.map +1 -0
- package/modules/risk/dist/optimize.d.ts +231 -0
- package/modules/risk/dist/optimize.d.ts.map +1 -0
- package/modules/risk/dist/optimize.js +1258 -0
- package/modules/risk/dist/optimize.js.map +1 -0
- package/modules/risk/dist/optimizer-validation.d.ts +26 -0
- package/modules/risk/dist/optimizer-validation.d.ts.map +1 -0
- package/modules/risk/dist/optimizer-validation.js +306 -0
- package/modules/risk/dist/optimizer-validation.js.map +1 -0
- package/modules/risk/dist/options-internal.d.ts +18 -0
- package/modules/risk/dist/options-internal.d.ts.map +1 -0
- package/modules/risk/dist/options-internal.js +49 -0
- package/modules/risk/dist/options-internal.js.map +1 -0
- package/modules/risk/dist/pnl-explain.d.ts +169 -0
- package/modules/risk/dist/pnl-explain.d.ts.map +1 -0
- package/modules/risk/dist/pnl-explain.js +327 -0
- package/modules/risk/dist/pnl-explain.js.map +1 -0
- package/modules/risk/dist/portfolio.d.ts +322 -0
- package/modules/risk/dist/portfolio.d.ts.map +1 -0
- package/modules/risk/dist/portfolio.js +547 -0
- package/modules/risk/dist/portfolio.js.map +1 -0
- package/modules/risk/dist/research-protocol.d.ts +74 -0
- package/modules/risk/dist/research-protocol.d.ts.map +1 -0
- package/modules/risk/dist/research-protocol.js +193 -0
- package/modules/risk/dist/research-protocol.js.map +1 -0
- package/modules/risk/dist/research.d.ts +255 -0
- package/modules/risk/dist/research.d.ts.map +1 -0
- package/modules/risk/dist/research.js +752 -0
- package/modules/risk/dist/research.js.map +1 -0
- package/modules/risk/dist/scenario.d.ts +279 -0
- package/modules/risk/dist/scenario.d.ts.map +1 -0
- package/modules/risk/dist/scenario.js +458 -0
- package/modules/risk/dist/scenario.js.map +1 -0
- package/modules/risk/dist/sizing.d.ts +14 -0
- package/modules/risk/dist/sizing.d.ts.map +1 -0
- package/modules/risk/dist/sizing.js +12 -0
- package/modules/risk/dist/sizing.js.map +1 -0
- package/modules/risk/dist/strategy-shape.d.ts +84 -0
- package/modules/risk/dist/strategy-shape.d.ts.map +1 -0
- package/modules/risk/dist/strategy-shape.js +17 -0
- package/modules/risk/dist/strategy-shape.js.map +1 -0
- package/modules/risk/dist/value-at-risk.d.ts +240 -0
- package/modules/risk/dist/value-at-risk.d.ts.map +1 -0
- package/modules/risk/dist/value-at-risk.js +743 -0
- package/modules/risk/dist/value-at-risk.js.map +1 -0
- package/modules/risk/etc/risk.api.md +228 -0
- package/modules/risk/src/attribution.ts +480 -0
- package/modules/risk/src/book-var.ts +717 -0
- package/modules/risk/src/book.ts +327 -0
- package/modules/risk/src/covariance.ts +293 -0
- package/modules/risk/src/evt.ts +899 -0
- package/modules/risk/src/expected-returns.ts +572 -0
- package/modules/risk/src/factor.ts +199 -0
- package/modules/risk/src/frontier.ts +1570 -0
- package/modules/risk/src/index.ts +281 -0
- package/modules/risk/src/input-description.ts +15 -0
- package/modules/risk/src/kelly.ts +1119 -0
- package/modules/risk/src/linalg.ts +100 -0
- package/modules/risk/src/numeric-vector.ts +153 -0
- package/modules/risk/src/optimize.ts +1769 -0
- package/modules/risk/src/optimizer-validation.ts +467 -0
- package/modules/risk/src/options-internal.ts +73 -0
- package/modules/risk/src/pnl-explain.ts +544 -0
- package/modules/risk/src/portfolio.ts +911 -0
- package/modules/risk/src/research-protocol.ts +277 -0
- package/modules/risk/src/research.ts +1076 -0
- package/modules/risk/src/scenario.ts +728 -0
- package/modules/risk/src/sizing.ts +15 -0
- package/modules/risk/src/strategy-shape.ts +90 -0
- package/modules/risk/src/value-at-risk.ts +1102 -0
- package/modules/scenarios/dist/aggregates.d.ts +27 -0
- package/modules/scenarios/dist/aggregates.d.ts.map +1 -0
- package/modules/scenarios/dist/aggregates.js +262 -0
- package/modules/scenarios/dist/aggregates.js.map +1 -0
- package/modules/scenarios/dist/fx.d.ts +69 -0
- package/modules/scenarios/dist/fx.d.ts.map +1 -0
- package/modules/scenarios/dist/fx.js +349 -0
- package/modules/scenarios/dist/fx.js.map +1 -0
- package/modules/scenarios/dist/index.d.ts +6 -0
- package/modules/scenarios/dist/index.d.ts.map +1 -0
- package/modules/scenarios/dist/index.js +6 -0
- package/modules/scenarios/dist/index.js.map +1 -0
- package/modules/scenarios/dist/internal/behaviors.d.ts +28 -0
- package/modules/scenarios/dist/internal/behaviors.d.ts.map +1 -0
- package/modules/scenarios/dist/internal/behaviors.js +169 -0
- package/modules/scenarios/dist/internal/behaviors.js.map +1 -0
- package/modules/scenarios/dist/internal/data.d.ts +35 -0
- package/modules/scenarios/dist/internal/data.d.ts.map +1 -0
- package/modules/scenarios/dist/internal/data.js +194 -0
- package/modules/scenarios/dist/internal/data.js.map +1 -0
- package/modules/scenarios/dist/internal/failures.d.ts +18 -0
- package/modules/scenarios/dist/internal/failures.d.ts.map +1 -0
- package/modules/scenarios/dist/internal/failures.js +184 -0
- package/modules/scenarios/dist/internal/failures.js.map +1 -0
- package/modules/scenarios/dist/internal/results.d.ts +18 -0
- package/modules/scenarios/dist/internal/results.d.ts.map +1 -0
- package/modules/scenarios/dist/internal/results.js +100 -0
- package/modules/scenarios/dist/internal/results.js.map +1 -0
- package/modules/scenarios/dist/market-resolution.d.ts +32 -0
- package/modules/scenarios/dist/market-resolution.d.ts.map +1 -0
- package/modules/scenarios/dist/market-resolution.js +296 -0
- package/modules/scenarios/dist/market-resolution.js.map +1 -0
- package/modules/scenarios/dist/portfolio.d.ts +11 -0
- package/modules/scenarios/dist/portfolio.d.ts.map +1 -0
- package/modules/scenarios/dist/portfolio.js +419 -0
- package/modules/scenarios/dist/portfolio.js.map +1 -0
- package/modules/scenarios/dist/run.d.ts +4 -0
- package/modules/scenarios/dist/run.d.ts.map +1 -0
- package/modules/scenarios/dist/run.js +933 -0
- package/modules/scenarios/dist/run.js.map +1 -0
- package/modules/scenarios/dist/spot-pricer.d.ts +21 -0
- package/modules/scenarios/dist/spot-pricer.d.ts.map +1 -0
- package/modules/scenarios/dist/spot-pricer.js +97 -0
- package/modules/scenarios/dist/spot-pricer.js.map +1 -0
- package/modules/scenarios/dist/targets.d.ts +18 -0
- package/modules/scenarios/dist/targets.d.ts.map +1 -0
- package/modules/scenarios/dist/targets.js +507 -0
- package/modules/scenarios/dist/targets.js.map +1 -0
- package/modules/scenarios/dist/taylor.d.ts +23 -0
- package/modules/scenarios/dist/taylor.d.ts.map +1 -0
- package/modules/scenarios/dist/taylor.js +209 -0
- package/modules/scenarios/dist/taylor.js.map +1 -0
- package/modules/scenarios/dist/transform.d.ts +31 -0
- package/modules/scenarios/dist/transform.d.ts.map +1 -0
- package/modules/scenarios/dist/transform.js +318 -0
- package/modules/scenarios/dist/transform.js.map +1 -0
- package/modules/scenarios/dist/types.d.ts +591 -0
- package/modules/scenarios/dist/types.d.ts.map +1 -0
- package/modules/scenarios/dist/types.js +2 -0
- package/modules/scenarios/dist/types.js.map +1 -0
- package/modules/scenarios/dist/work.d.ts +85 -0
- package/modules/scenarios/dist/work.d.ts.map +1 -0
- package/modules/scenarios/dist/work.js +629 -0
- package/modules/scenarios/dist/work.js.map +1 -0
- package/modules/scenarios/etc/scenarios.api.md +76 -0
- package/modules/scenarios/src/aggregates.ts +429 -0
- package/modules/scenarios/src/fx.ts +563 -0
- package/modules/scenarios/src/index.ts +5 -0
- package/modules/scenarios/src/internal/behaviors.ts +249 -0
- package/modules/scenarios/src/internal/data.ts +258 -0
- package/modules/scenarios/src/internal/failures.ts +219 -0
- package/modules/scenarios/src/internal/results.ts +131 -0
- package/modules/scenarios/src/market-resolution.ts +436 -0
- package/modules/scenarios/src/portfolio.ts +639 -0
- package/modules/scenarios/src/run.ts +1417 -0
- package/modules/scenarios/src/spot-pricer.ts +129 -0
- package/modules/scenarios/src/targets.ts +729 -0
- package/modules/scenarios/src/taylor.ts +287 -0
- package/modules/scenarios/src/transform.ts +468 -0
- package/modules/scenarios/src/types.ts +713 -0
- package/modules/scenarios/src/work.ts +1055 -0
- package/modules/strategy/dist/auto-range.d.ts +14 -0
- package/modules/strategy/dist/auto-range.d.ts.map +1 -0
- package/modules/strategy/dist/auto-range.js +19 -0
- package/modules/strategy/dist/auto-range.js.map +1 -0
- package/modules/strategy/dist/builders.d.ts +75 -0
- package/modules/strategy/dist/builders.d.ts.map +1 -0
- package/modules/strategy/dist/builders.js +112 -0
- package/modules/strategy/dist/builders.js.map +1 -0
- package/modules/strategy/dist/calendars.d.ts +70 -0
- package/modules/strategy/dist/calendars.d.ts.map +1 -0
- package/modules/strategy/dist/calendars.js +149 -0
- package/modules/strategy/dist/calendars.js.map +1 -0
- package/modules/strategy/dist/classify.d.ts +77 -0
- package/modules/strategy/dist/classify.d.ts.map +1 -0
- package/modules/strategy/dist/classify.js +144 -0
- package/modules/strategy/dist/classify.js.map +1 -0
- package/modules/strategy/dist/explain.d.ts +77 -0
- package/modules/strategy/dist/explain.d.ts.map +1 -0
- package/modules/strategy/dist/explain.js +300 -0
- package/modules/strategy/dist/explain.js.map +1 -0
- package/modules/strategy/dist/from-chain.d.ts +88 -0
- package/modules/strategy/dist/from-chain.d.ts.map +1 -0
- package/modules/strategy/dist/from-chain.js +457 -0
- package/modules/strategy/dist/from-chain.js.map +1 -0
- package/modules/strategy/dist/index.d.ts +102 -0
- package/modules/strategy/dist/index.d.ts.map +1 -0
- package/modules/strategy/dist/index.js +41 -0
- package/modules/strategy/dist/index.js.map +1 -0
- package/modules/strategy/dist/legs.d.ts +47 -0
- package/modules/strategy/dist/legs.d.ts.map +1 -0
- package/modules/strategy/dist/legs.js +87 -0
- package/modules/strategy/dist/legs.js.map +1 -0
- package/modules/strategy/dist/manifest.d.ts +116 -0
- package/modules/strategy/dist/manifest.d.ts.map +1 -0
- package/modules/strategy/dist/manifest.js +376 -0
- package/modules/strategy/dist/manifest.js.map +1 -0
- package/modules/strategy/dist/optimizer.d.ts +184 -0
- package/modules/strategy/dist/optimizer.d.ts.map +1 -0
- package/modules/strategy/dist/optimizer.js +404 -0
- package/modules/strategy/dist/optimizer.js.map +1 -0
- package/modules/strategy/dist/position.d.ts +181 -0
- package/modules/strategy/dist/position.d.ts.map +1 -0
- package/modules/strategy/dist/position.js +1693 -0
- package/modules/strategy/dist/position.js.map +1 -0
- package/modules/strategy/dist/probability.d.ts +192 -0
- package/modules/strategy/dist/probability.d.ts.map +1 -0
- package/modules/strategy/dist/probability.js +106 -0
- package/modules/strategy/dist/probability.js.map +1 -0
- package/modules/strategy/dist/scanner.d.ts +147 -0
- package/modules/strategy/dist/scanner.d.ts.map +1 -0
- package/modules/strategy/dist/scanner.js +438 -0
- package/modules/strategy/dist/scanner.js.map +1 -0
- package/modules/strategy/dist/strategies.d.ts +187 -0
- package/modules/strategy/dist/strategies.d.ts.map +1 -0
- package/modules/strategy/dist/strategies.js +541 -0
- package/modules/strategy/dist/strategies.js.map +1 -0
- package/modules/strategy/dist/svg.d.ts +35 -0
- package/modules/strategy/dist/svg.d.ts.map +1 -0
- package/modules/strategy/dist/svg.js +298 -0
- package/modules/strategy/dist/svg.js.map +1 -0
- package/modules/strategy/dist/thesis-distribution.d.ts +79 -0
- package/modules/strategy/dist/thesis-distribution.d.ts.map +1 -0
- package/modules/strategy/dist/thesis-distribution.js +125 -0
- package/modules/strategy/dist/thesis-distribution.js.map +1 -0
- package/modules/strategy/dist/types.d.ts +370 -0
- package/modules/strategy/dist/types.d.ts.map +1 -0
- package/modules/strategy/dist/types.js +8 -0
- package/modules/strategy/dist/types.js.map +1 -0
- package/modules/strategy/dist/validate.d.ts +63 -0
- package/modules/strategy/dist/validate.d.ts.map +1 -0
- package/modules/strategy/dist/validate.js +146 -0
- package/modules/strategy/dist/validate.js.map +1 -0
- package/modules/strategy/etc/strategy.api.md +174 -0
- package/modules/strategy/src/auto-range.ts +21 -0
- package/modules/strategy/src/builders.ts +221 -0
- package/modules/strategy/src/calendars.ts +245 -0
- package/modules/strategy/src/classify.ts +215 -0
- package/modules/strategy/src/explain.ts +471 -0
- package/modules/strategy/src/from-chain.ts +643 -0
- package/modules/strategy/src/index.ts +212 -0
- package/modules/strategy/src/legs.ts +140 -0
- package/modules/strategy/src/manifest.ts +756 -0
- package/modules/strategy/src/optimizer.ts +679 -0
- package/modules/strategy/src/position.ts +2084 -0
- package/modules/strategy/src/probability.ts +301 -0
- package/modules/strategy/src/scanner.ts +711 -0
- package/modules/strategy/src/strategies.ts +1018 -0
- package/modules/strategy/src/svg.ts +415 -0
- package/modules/strategy/src/thesis-distribution.ts +188 -0
- package/modules/strategy/src/types.ts +380 -0
- package/modules/strategy/src/validate.ts +207 -0
- package/modules/structure/OPTION-FLOW-DRIFT.md +126 -0
- package/modules/structure/dist/exposure.d.ts +350 -0
- package/modules/structure/dist/exposure.d.ts.map +1 -0
- package/modules/structure/dist/exposure.js +917 -0
- package/modules/structure/dist/exposure.js.map +1 -0
- package/modules/structure/dist/flow.d.ts +247 -0
- package/modules/structure/dist/flow.d.ts.map +1 -0
- package/modules/structure/dist/flow.js +643 -0
- package/modules/structure/dist/flow.js.map +1 -0
- package/modules/structure/dist/index.d.ts +20 -0
- package/modules/structure/dist/index.d.ts.map +1 -0
- package/modules/structure/dist/index.js +16 -0
- package/modules/structure/dist/index.js.map +1 -0
- package/modules/structure/dist/market-day.d.ts +29 -0
- package/modules/structure/dist/market-day.d.ts.map +1 -0
- package/modules/structure/dist/market-day.js +43 -0
- package/modules/structure/dist/market-day.js.map +1 -0
- package/modules/structure/dist/option-flow-drift.d.ts +184 -0
- package/modules/structure/dist/option-flow-drift.d.ts.map +1 -0
- package/modules/structure/dist/option-flow-drift.js +475 -0
- package/modules/structure/dist/option-flow-drift.js.map +1 -0
- package/modules/structure/dist/supplied-exposure.d.ts +191 -0
- package/modules/structure/dist/supplied-exposure.d.ts.map +1 -0
- package/modules/structure/dist/supplied-exposure.js +421 -0
- package/modules/structure/dist/supplied-exposure.js.map +1 -0
- package/modules/structure/etc/structure.api.md +72 -0
- package/modules/structure/src/exposure.ts +1330 -0
- package/modules/structure/src/flow.ts +955 -0
- package/modules/structure/src/index.ts +83 -0
- package/modules/structure/src/market-day.ts +47 -0
- package/modules/structure/src/option-flow-drift.ts +726 -0
- package/modules/structure/src/supplied-exposure.ts +671 -0
- package/modules/technical-analysis/dist/aliases.d.ts +42 -0
- package/modules/technical-analysis/dist/aliases.d.ts.map +1 -0
- package/modules/technical-analysis/dist/aliases.js +413 -0
- package/modules/technical-analysis/dist/aliases.js.map +1 -0
- package/modules/technical-analysis/dist/bands.d.ts +31 -0
- package/modules/technical-analysis/dist/bands.d.ts.map +1 -0
- package/modules/technical-analysis/dist/bands.js +79 -0
- package/modules/technical-analysis/dist/bands.js.map +1 -0
- package/modules/technical-analysis/dist/bars.d.ts +113 -0
- package/modules/technical-analysis/dist/bars.d.ts.map +1 -0
- package/modules/technical-analysis/dist/bars.js +374 -0
- package/modules/technical-analysis/dist/bars.js.map +1 -0
- package/modules/technical-analysis/dist/builtin-metadata.d.ts +1817 -0
- package/modules/technical-analysis/dist/builtin-metadata.d.ts.map +1 -0
- package/modules/technical-analysis/dist/builtin-metadata.js +1399 -0
- package/modules/technical-analysis/dist/builtin-metadata.js.map +1 -0
- package/modules/technical-analysis/dist/candle-aliases.d.ts +56 -0
- package/modules/technical-analysis/dist/candle-aliases.d.ts.map +1 -0
- package/modules/technical-analysis/dist/candle-aliases.js +246 -0
- package/modules/technical-analysis/dist/candle-aliases.js.map +1 -0
- package/modules/technical-analysis/dist/candle-talib.d.ts +114 -0
- package/modules/technical-analysis/dist/candle-talib.d.ts.map +1 -0
- package/modules/technical-analysis/dist/candle-talib.js +185 -0
- package/modules/technical-analysis/dist/candle-talib.js.map +1 -0
- package/modules/technical-analysis/dist/candlesticks.d.ts +103 -0
- package/modules/technical-analysis/dist/candlesticks.d.ts.map +1 -0
- package/modules/technical-analysis/dist/candlesticks.js +1009 -0
- package/modules/technical-analysis/dist/candlesticks.js.map +1 -0
- package/modules/technical-analysis/dist/chart-types.d.ts +205 -0
- package/modules/technical-analysis/dist/chart-types.d.ts.map +1 -0
- package/modules/technical-analysis/dist/chart-types.js +633 -0
- package/modules/technical-analysis/dist/chart-types.js.map +1 -0
- package/modules/technical-analysis/dist/columns.d.ts +24 -0
- package/modules/technical-analysis/dist/columns.d.ts.map +1 -0
- package/modules/technical-analysis/dist/columns.js +71 -0
- package/modules/technical-analysis/dist/columns.js.map +1 -0
- package/modules/technical-analysis/dist/cycle.d.ts +174 -0
- package/modules/technical-analysis/dist/cycle.d.ts.map +1 -0
- package/modules/technical-analysis/dist/cycle.js +489 -0
- package/modules/technical-analysis/dist/cycle.js.map +1 -0
- package/modules/technical-analysis/dist/discover.d.ts +100 -0
- package/modules/technical-analysis/dist/discover.d.ts.map +1 -0
- package/modules/technical-analysis/dist/discover.js +273 -0
- package/modules/technical-analysis/dist/discover.js.map +1 -0
- package/modules/technical-analysis/dist/divergence.d.ts +82 -0
- package/modules/technical-analysis/dist/divergence.d.ts.map +1 -0
- package/modules/technical-analysis/dist/divergence.js +269 -0
- package/modules/technical-analysis/dist/divergence.js.map +1 -0
- package/modules/technical-analysis/dist/features-ext.d.ts +162 -0
- package/modules/technical-analysis/dist/features-ext.d.ts.map +1 -0
- package/modules/technical-analysis/dist/features-ext.js +633 -0
- package/modules/technical-analysis/dist/features-ext.js.map +1 -0
- package/modules/technical-analysis/dist/features.d.ts +10 -0
- package/modules/technical-analysis/dist/features.d.ts.map +1 -0
- package/modules/technical-analysis/dist/features.js +10 -0
- package/modules/technical-analysis/dist/features.js.map +1 -0
- package/modules/technical-analysis/dist/framework.d.ts +353 -0
- package/modules/technical-analysis/dist/framework.d.ts.map +1 -0
- package/modules/technical-analysis/dist/framework.js +999 -0
- package/modules/technical-analysis/dist/framework.js.map +1 -0
- package/modules/technical-analysis/dist/fuzzy.d.ts +33 -0
- package/modules/technical-analysis/dist/fuzzy.d.ts.map +1 -0
- package/modules/technical-analysis/dist/fuzzy.js +80 -0
- package/modules/technical-analysis/dist/fuzzy.js.map +1 -0
- package/modules/technical-analysis/dist/generated/validation-specs.d.ts +12 -0
- package/modules/technical-analysis/dist/generated/validation-specs.d.ts.map +1 -0
- package/modules/technical-analysis/dist/generated/validation-specs.js +1052 -0
- package/modules/technical-analysis/dist/generated/validation-specs.js.map +1 -0
- package/modules/technical-analysis/dist/index.d.ts +132 -0
- package/modules/technical-analysis/dist/index.d.ts.map +1 -0
- package/modules/technical-analysis/dist/index.js +100 -0
- package/modules/technical-analysis/dist/index.js.map +1 -0
- package/modules/technical-analysis/dist/indicator-metadata.d.ts +21 -0
- package/modules/technical-analysis/dist/indicator-metadata.d.ts.map +1 -0
- package/modules/technical-analysis/dist/indicator-metadata.js +23 -0
- package/modules/technical-analysis/dist/indicator-metadata.js.map +1 -0
- package/modules/technical-analysis/dist/limits.d.ts +19 -0
- package/modules/technical-analysis/dist/limits.d.ts.map +1 -0
- package/modules/technical-analysis/dist/limits.js +19 -0
- package/modules/technical-analysis/dist/limits.js.map +1 -0
- package/modules/technical-analysis/dist/macd.d.ts +29 -0
- package/modules/technical-analysis/dist/macd.d.ts.map +1 -0
- package/modules/technical-analysis/dist/macd.js +61 -0
- package/modules/technical-analysis/dist/macd.js.map +1 -0
- package/modules/technical-analysis/dist/math.d.ts +69 -0
- package/modules/technical-analysis/dist/math.d.ts.map +1 -0
- package/modules/technical-analysis/dist/math.js +124 -0
- package/modules/technical-analysis/dist/math.js.map +1 -0
- package/modules/technical-analysis/dist/microstructure.d.ts +252 -0
- package/modules/technical-analysis/dist/microstructure.d.ts.map +1 -0
- package/modules/technical-analysis/dist/microstructure.js +552 -0
- package/modules/technical-analysis/dist/microstructure.js.map +1 -0
- package/modules/technical-analysis/dist/momentum-ext.d.ts +619 -0
- package/modules/technical-analysis/dist/momentum-ext.d.ts.map +1 -0
- package/modules/technical-analysis/dist/momentum-ext.js +1772 -0
- package/modules/technical-analysis/dist/momentum-ext.js.map +1 -0
- package/modules/technical-analysis/dist/momentum.d.ts +15 -0
- package/modules/technical-analysis/dist/momentum.d.ts.map +1 -0
- package/modules/technical-analysis/dist/momentum.js +14 -0
- package/modules/technical-analysis/dist/momentum.js.map +1 -0
- package/modules/technical-analysis/dist/moving-averages.d.ts +344 -0
- package/modules/technical-analysis/dist/moving-averages.d.ts.map +1 -0
- package/modules/technical-analysis/dist/moving-averages.js +1279 -0
- package/modules/technical-analysis/dist/moving-averages.js.map +1 -0
- package/modules/technical-analysis/dist/nan-policy.d.ts +42 -0
- package/modules/technical-analysis/dist/nan-policy.d.ts.map +1 -0
- package/modules/technical-analysis/dist/nan-policy.js +60 -0
- package/modules/technical-analysis/dist/nan-policy.js.map +1 -0
- package/modules/technical-analysis/dist/oscillators.d.ts +377 -0
- package/modules/technical-analysis/dist/oscillators.d.ts.map +1 -0
- package/modules/technical-analysis/dist/oscillators.js +1225 -0
- package/modules/technical-analysis/dist/oscillators.js.map +1 -0
- package/modules/technical-analysis/dist/output-meta.d.ts +71 -0
- package/modules/technical-analysis/dist/output-meta.d.ts.map +1 -0
- package/modules/technical-analysis/dist/output-meta.js +399 -0
- package/modules/technical-analysis/dist/output-meta.js.map +1 -0
- package/modules/technical-analysis/dist/overlap-ext.d.ts +206 -0
- package/modules/technical-analysis/dist/overlap-ext.d.ts.map +1 -0
- package/modules/technical-analysis/dist/overlap-ext.js +550 -0
- package/modules/technical-analysis/dist/overlap-ext.js.map +1 -0
- package/modules/technical-analysis/dist/overlap.d.ts +11 -0
- package/modules/technical-analysis/dist/overlap.d.ts.map +1 -0
- package/modules/technical-analysis/dist/overlap.js +10 -0
- package/modules/technical-analysis/dist/overlap.js.map +1 -0
- package/modules/technical-analysis/dist/performance-ext.d.ts +21 -0
- package/modules/technical-analysis/dist/performance-ext.d.ts.map +1 -0
- package/modules/technical-analysis/dist/performance-ext.js +31 -0
- package/modules/technical-analysis/dist/performance-ext.js.map +1 -0
- package/modules/technical-analysis/dist/pipeline.d.ts +105 -0
- package/modules/technical-analysis/dist/pipeline.d.ts.map +1 -0
- package/modules/technical-analysis/dist/pipeline.js +224 -0
- package/modules/technical-analysis/dist/pipeline.js.map +1 -0
- package/modules/technical-analysis/dist/price-action-ext.d.ts +90 -0
- package/modules/technical-analysis/dist/price-action-ext.d.ts.map +1 -0
- package/modules/technical-analysis/dist/price-action-ext.js +511 -0
- package/modules/technical-analysis/dist/price-action-ext.js.map +1 -0
- package/modules/technical-analysis/dist/price-action.d.ts +348 -0
- package/modules/technical-analysis/dist/price-action.d.ts.map +1 -0
- package/modules/technical-analysis/dist/price-action.js +613 -0
- package/modules/technical-analysis/dist/price-action.js.map +1 -0
- package/modules/technical-analysis/dist/registry.d.ts +84 -0
- package/modules/technical-analysis/dist/registry.d.ts.map +1 -0
- package/modules/technical-analysis/dist/registry.js +625 -0
- package/modules/technical-analysis/dist/registry.js.map +1 -0
- package/modules/technical-analysis/dist/resample.d.ts +77 -0
- package/modules/technical-analysis/dist/resample.d.ts.map +1 -0
- package/modules/technical-analysis/dist/resample.js +239 -0
- package/modules/technical-analysis/dist/resample.js.map +1 -0
- package/modules/technical-analysis/dist/rsi.d.ts +36 -0
- package/modules/technical-analysis/dist/rsi.d.ts.map +1 -0
- package/modules/technical-analysis/dist/rsi.js +95 -0
- package/modules/technical-analysis/dist/rsi.js.map +1 -0
- package/modules/technical-analysis/dist/series.d.ts +40 -0
- package/modules/technical-analysis/dist/series.d.ts.map +1 -0
- package/modules/technical-analysis/dist/series.js +125 -0
- package/modules/technical-analysis/dist/series.js.map +1 -0
- package/modules/technical-analysis/dist/signal.d.ts +140 -0
- package/modules/technical-analysis/dist/signal.d.ts.map +1 -0
- package/modules/technical-analysis/dist/signal.js +353 -0
- package/modules/technical-analysis/dist/signal.js.map +1 -0
- package/modules/technical-analysis/dist/snapshot-cardinality.d.ts +17 -0
- package/modules/technical-analysis/dist/snapshot-cardinality.d.ts.map +1 -0
- package/modules/technical-analysis/dist/snapshot-cardinality.js +53 -0
- package/modules/technical-analysis/dist/snapshot-cardinality.js.map +1 -0
- package/modules/technical-analysis/dist/snapshot-envelope.d.ts +19 -0
- package/modules/technical-analysis/dist/snapshot-envelope.d.ts.map +1 -0
- package/modules/technical-analysis/dist/snapshot-envelope.js +87 -0
- package/modules/technical-analysis/dist/snapshot-envelope.js.map +1 -0
- package/modules/technical-analysis/dist/statistics.d.ts +146 -0
- package/modules/technical-analysis/dist/statistics.d.ts.map +1 -0
- package/modules/technical-analysis/dist/statistics.js +524 -0
- package/modules/technical-analysis/dist/statistics.js.map +1 -0
- package/modules/technical-analysis/dist/stream-validation.d.ts +14 -0
- package/modules/technical-analysis/dist/stream-validation.d.ts.map +1 -0
- package/modules/technical-analysis/dist/stream-validation.js +35 -0
- package/modules/technical-analysis/dist/stream-validation.js.map +1 -0
- package/modules/technical-analysis/dist/transforms.d.ts +77 -0
- package/modules/technical-analysis/dist/transforms.d.ts.map +1 -0
- package/modules/technical-analysis/dist/transforms.js +246 -0
- package/modules/technical-analysis/dist/transforms.js.map +1 -0
- package/modules/technical-analysis/dist/trend-ext.d.ts +121 -0
- package/modules/technical-analysis/dist/trend-ext.d.ts.map +1 -0
- package/modules/technical-analysis/dist/trend-ext.js +691 -0
- package/modules/technical-analysis/dist/trend-ext.js.map +1 -0
- package/modules/technical-analysis/dist/trend.d.ts +373 -0
- package/modules/technical-analysis/dist/trend.d.ts.map +1 -0
- package/modules/technical-analysis/dist/trend.js +1159 -0
- package/modules/technical-analysis/dist/trend.js.map +1 -0
- package/modules/technical-analysis/dist/validate.d.ts +61 -0
- package/modules/technical-analysis/dist/validate.d.ts.map +1 -0
- package/modules/technical-analysis/dist/validate.js +334 -0
- package/modules/technical-analysis/dist/validate.js.map +1 -0
- package/modules/technical-analysis/dist/volatility-ext.d.ts +98 -0
- package/modules/technical-analysis/dist/volatility-ext.d.ts.map +1 -0
- package/modules/technical-analysis/dist/volatility-ext.js +535 -0
- package/modules/technical-analysis/dist/volatility-ext.js.map +1 -0
- package/modules/technical-analysis/dist/volatility.d.ts +239 -0
- package/modules/technical-analysis/dist/volatility.d.ts.map +1 -0
- package/modules/technical-analysis/dist/volatility.js +709 -0
- package/modules/technical-analysis/dist/volatility.js.map +1 -0
- package/modules/technical-analysis/dist/volume-core.d.ts +273 -0
- package/modules/technical-analysis/dist/volume-core.d.ts.map +1 -0
- package/modules/technical-analysis/dist/volume-core.js +847 -0
- package/modules/technical-analysis/dist/volume-core.js.map +1 -0
- package/modules/technical-analysis/dist/volume-ext.d.ts +61 -0
- package/modules/technical-analysis/dist/volume-ext.d.ts.map +1 -0
- package/modules/technical-analysis/dist/volume-ext.js +270 -0
- package/modules/technical-analysis/dist/volume-ext.js.map +1 -0
- package/modules/technical-analysis/dist/volume.d.ts +15 -0
- package/modules/technical-analysis/dist/volume.d.ts.map +1 -0
- package/modules/technical-analysis/dist/volume.js +15 -0
- package/modules/technical-analysis/dist/volume.js.map +1 -0
- package/modules/technical-analysis/dist/warmup.d.ts +38 -0
- package/modules/technical-analysis/dist/warmup.d.ts.map +1 -0
- package/modules/technical-analysis/dist/warmup.js +269 -0
- package/modules/technical-analysis/dist/warmup.js.map +1 -0
- package/modules/technical-analysis/etc/technical-analysis.api.md +663 -0
- package/modules/technical-analysis/src/aliases.ts +466 -0
- package/modules/technical-analysis/src/bands.ts +113 -0
- package/modules/technical-analysis/src/bars.ts +456 -0
- package/modules/technical-analysis/src/builtin-metadata.ts +1686 -0
- package/modules/technical-analysis/src/candle-aliases.ts +289 -0
- package/modules/technical-analysis/src/candle-talib.ts +215 -0
- package/modules/technical-analysis/src/candlesticks.ts +1024 -0
- package/modules/technical-analysis/src/chart-types.ts +813 -0
- package/modules/technical-analysis/src/columns.ts +87 -0
- package/modules/technical-analysis/src/cycle.ts +625 -0
- package/modules/technical-analysis/src/discover.ts +390 -0
- package/modules/technical-analysis/src/divergence.ts +388 -0
- package/modules/technical-analysis/src/features-ext.ts +866 -0
- package/modules/technical-analysis/src/features.ts +9 -0
- package/modules/technical-analysis/src/framework.ts +1331 -0
- package/modules/technical-analysis/src/fuzzy.ts +92 -0
- package/modules/technical-analysis/src/generated/validation-specs.ts +1055 -0
- package/modules/technical-analysis/src/index.ts +825 -0
- package/modules/technical-analysis/src/indicator-metadata.ts +43 -0
- package/modules/technical-analysis/src/limits.ts +19 -0
- package/modules/technical-analysis/src/macd.ts +95 -0
- package/modules/technical-analysis/src/math.ts +181 -0
- package/modules/technical-analysis/src/microstructure.ts +870 -0
- package/modules/technical-analysis/src/momentum-ext.ts +2348 -0
- package/modules/technical-analysis/src/momentum.ts +16 -0
- package/modules/technical-analysis/src/moving-averages.ts +1525 -0
- package/modules/technical-analysis/src/nan-policy.ts +58 -0
- package/modules/technical-analysis/src/oscillators.ts +1586 -0
- package/modules/technical-analysis/src/output-meta.ts +466 -0
- package/modules/technical-analysis/src/overlap-ext.ts +792 -0
- package/modules/technical-analysis/src/overlap.ts +12 -0
- package/modules/technical-analysis/src/performance-ext.ts +57 -0
- package/modules/technical-analysis/src/pipeline.ts +270 -0
- package/modules/technical-analysis/src/price-action-ext.ts +675 -0
- package/modules/technical-analysis/src/price-action.ts +955 -0
- package/modules/technical-analysis/src/registry.ts +784 -0
- package/modules/technical-analysis/src/resample.ts +335 -0
- package/modules/technical-analysis/src/rsi.ts +120 -0
- package/modules/technical-analysis/src/series.ts +168 -0
- package/modules/technical-analysis/src/signal.ts +429 -0
- package/modules/technical-analysis/src/snapshot-cardinality.ts +83 -0
- package/modules/technical-analysis/src/snapshot-envelope.ts +131 -0
- package/modules/technical-analysis/src/statistics.ts +720 -0
- package/modules/technical-analysis/src/stream-validation.ts +42 -0
- package/modules/technical-analysis/src/transforms.ts +351 -0
- package/modules/technical-analysis/src/trend-ext.ts +957 -0
- package/modules/technical-analysis/src/trend.ts +1529 -0
- package/modules/technical-analysis/src/validate.ts +555 -0
- package/modules/technical-analysis/src/volatility-ext.ts +781 -0
- package/modules/technical-analysis/src/volatility.ts +963 -0
- package/modules/technical-analysis/src/volume-core.ts +1106 -0
- package/modules/technical-analysis/src/volume-ext.ts +380 -0
- package/modules/technical-analysis/src/volume.ts +14 -0
- package/modules/technical-analysis/src/warmup.ts +322 -0
- package/modules/totalfinance/dist/backtest.d.ts +3 -0
- package/modules/totalfinance/dist/backtest.d.ts.map +1 -0
- package/modules/totalfinance/dist/backtest.js +3 -0
- package/modules/totalfinance/dist/backtest.js.map +1 -0
- package/modules/totalfinance/dist/calendars.d.ts +3 -0
- package/modules/totalfinance/dist/calendars.d.ts.map +1 -0
- package/modules/totalfinance/dist/calendars.js +3 -0
- package/modules/totalfinance/dist/calendars.js.map +1 -0
- package/modules/totalfinance/dist/commodities.d.ts +2 -0
- package/modules/totalfinance/dist/commodities.d.ts.map +1 -0
- package/modules/totalfinance/dist/commodities.js +2 -0
- package/modules/totalfinance/dist/commodities.js.map +1 -0
- package/modules/totalfinance/dist/core.d.ts +3 -0
- package/modules/totalfinance/dist/core.d.ts.map +1 -0
- package/modules/totalfinance/dist/core.js +3 -0
- package/modules/totalfinance/dist/core.js.map +1 -0
- package/modules/totalfinance/dist/crypto.d.ts +3 -0
- package/modules/totalfinance/dist/crypto.d.ts.map +1 -0
- package/modules/totalfinance/dist/crypto.js +3 -0
- package/modules/totalfinance/dist/crypto.js.map +1 -0
- package/modules/totalfinance/dist/fixed-income.d.ts +3 -0
- package/modules/totalfinance/dist/fixed-income.d.ts.map +1 -0
- package/modules/totalfinance/dist/fixed-income.js +3 -0
- package/modules/totalfinance/dist/fixed-income.js.map +1 -0
- package/modules/totalfinance/dist/foreign-exchange.d.ts +2 -0
- package/modules/totalfinance/dist/foreign-exchange.d.ts.map +1 -0
- package/modules/totalfinance/dist/foreign-exchange.js +2 -0
- package/modules/totalfinance/dist/foreign-exchange.js.map +1 -0
- package/modules/totalfinance/dist/fundamentals.d.ts +3 -0
- package/modules/totalfinance/dist/fundamentals.d.ts.map +1 -0
- package/modules/totalfinance/dist/fundamentals.js +3 -0
- package/modules/totalfinance/dist/fundamentals.js.map +1 -0
- package/modules/totalfinance/dist/index.d.ts +90 -0
- package/modules/totalfinance/dist/index.d.ts.map +1 -0
- package/modules/totalfinance/dist/index.js +68 -0
- package/modules/totalfinance/dist/index.js.map +1 -0
- package/modules/totalfinance/dist/math.d.ts +3 -0
- package/modules/totalfinance/dist/math.d.ts.map +1 -0
- package/modules/totalfinance/dist/math.js +3 -0
- package/modules/totalfinance/dist/math.js.map +1 -0
- package/modules/totalfinance/dist/options.d.ts +3 -0
- package/modules/totalfinance/dist/options.d.ts.map +1 -0
- package/modules/totalfinance/dist/options.js +3 -0
- package/modules/totalfinance/dist/options.js.map +1 -0
- package/modules/totalfinance/dist/performance.d.ts +3 -0
- package/modules/totalfinance/dist/performance.d.ts.map +1 -0
- package/modules/totalfinance/dist/performance.js +3 -0
- package/modules/totalfinance/dist/performance.js.map +1 -0
- package/modules/totalfinance/dist/portfolio.d.ts +2 -0
- package/modules/totalfinance/dist/portfolio.d.ts.map +1 -0
- package/modules/totalfinance/dist/portfolio.js +2 -0
- package/modules/totalfinance/dist/portfolio.js.map +1 -0
- package/modules/totalfinance/dist/research.d.ts +2 -0
- package/modules/totalfinance/dist/research.d.ts.map +1 -0
- package/modules/totalfinance/dist/research.js +2 -0
- package/modules/totalfinance/dist/research.js.map +1 -0
- package/modules/totalfinance/dist/risk.d.ts +3 -0
- package/modules/totalfinance/dist/risk.d.ts.map +1 -0
- package/modules/totalfinance/dist/risk.js +3 -0
- package/modules/totalfinance/dist/risk.js.map +1 -0
- package/modules/totalfinance/dist/scenarios.d.ts +2 -0
- package/modules/totalfinance/dist/scenarios.d.ts.map +1 -0
- package/modules/totalfinance/dist/scenarios.js +2 -0
- package/modules/totalfinance/dist/scenarios.js.map +1 -0
- package/modules/totalfinance/dist/strategy.d.ts +3 -0
- package/modules/totalfinance/dist/strategy.d.ts.map +1 -0
- package/modules/totalfinance/dist/strategy.js +3 -0
- package/modules/totalfinance/dist/strategy.js.map +1 -0
- package/modules/totalfinance/dist/structure.d.ts +3 -0
- package/modules/totalfinance/dist/structure.d.ts.map +1 -0
- package/modules/totalfinance/dist/structure.js +3 -0
- package/modules/totalfinance/dist/structure.js.map +1 -0
- package/modules/totalfinance/dist/technical-analysis.d.ts +3 -0
- package/modules/totalfinance/dist/technical-analysis.d.ts.map +1 -0
- package/modules/totalfinance/dist/technical-analysis.js +3 -0
- package/modules/totalfinance/dist/technical-analysis.js.map +1 -0
- package/modules/totalfinance/dist/valuation.d.ts +3 -0
- package/modules/totalfinance/dist/valuation.d.ts.map +1 -0
- package/modules/totalfinance/dist/valuation.js +3 -0
- package/modules/totalfinance/dist/valuation.js.map +1 -0
- package/modules/totalfinance/dist/volatility.d.ts +3 -0
- package/modules/totalfinance/dist/volatility.d.ts.map +1 -0
- package/modules/totalfinance/dist/volatility.js +3 -0
- package/modules/totalfinance/dist/volatility.js.map +1 -0
- package/modules/totalfinance/etc/totalfinance.api.md +73 -0
- package/modules/totalfinance/src/backtest.ts +2 -0
- package/modules/totalfinance/src/calendars.ts +2 -0
- package/modules/totalfinance/src/commodities.ts +1 -0
- package/modules/totalfinance/src/core.ts +2 -0
- package/modules/totalfinance/src/crypto.ts +2 -0
- package/modules/totalfinance/src/fixed-income.ts +2 -0
- package/modules/totalfinance/src/foreign-exchange.ts +1 -0
- package/modules/totalfinance/src/fundamentals.ts +2 -0
- package/modules/totalfinance/src/index.ts +129 -0
- package/modules/totalfinance/src/math.ts +2 -0
- package/modules/totalfinance/src/options.ts +2 -0
- package/modules/totalfinance/src/performance.ts +2 -0
- package/modules/totalfinance/src/portfolio.ts +1 -0
- package/modules/totalfinance/src/research.ts +1 -0
- package/modules/totalfinance/src/risk.ts +2 -0
- package/modules/totalfinance/src/scenarios.ts +1 -0
- package/modules/totalfinance/src/strategy.ts +2 -0
- package/modules/totalfinance/src/structure.ts +2 -0
- package/modules/totalfinance/src/technical-analysis.ts +2 -0
- package/modules/totalfinance/src/valuation.ts +2 -0
- package/modules/totalfinance/src/volatility.ts +2 -0
- package/modules/valuation/dist/adjusted-present-value.d.ts +62 -0
- package/modules/valuation/dist/adjusted-present-value.d.ts.map +1 -0
- package/modules/valuation/dist/adjusted-present-value.js +85 -0
- package/modules/valuation/dist/adjusted-present-value.js.map +1 -0
- package/modules/valuation/dist/capital-budgeting.d.ts +84 -0
- package/modules/valuation/dist/capital-budgeting.d.ts.map +1 -0
- package/modules/valuation/dist/capital-budgeting.js +204 -0
- package/modules/valuation/dist/capital-budgeting.js.map +1 -0
- package/modules/valuation/dist/cash-flows.d.ts +11 -0
- package/modules/valuation/dist/cash-flows.d.ts.map +1 -0
- package/modules/valuation/dist/cash-flows.js +10 -0
- package/modules/valuation/dist/cash-flows.js.map +1 -0
- package/modules/valuation/dist/comparable.d.ts +101 -0
- package/modules/valuation/dist/comparable.d.ts.map +1 -0
- package/modules/valuation/dist/comparable.js +194 -0
- package/modules/valuation/dist/comparable.js.map +1 -0
- package/modules/valuation/dist/corporate-primitives.d.ts +185 -0
- package/modules/valuation/dist/corporate-primitives.d.ts.map +1 -0
- package/modules/valuation/dist/corporate-primitives.js +337 -0
- package/modules/valuation/dist/corporate-primitives.js.map +1 -0
- package/modules/valuation/dist/corporate.d.ts +14 -0
- package/modules/valuation/dist/corporate.d.ts.map +1 -0
- package/modules/valuation/dist/corporate.js +13 -0
- package/modules/valuation/dist/corporate.js.map +1 -0
- package/modules/valuation/dist/discounted-cash-flow.d.ts +269 -0
- package/modules/valuation/dist/discounted-cash-flow.d.ts.map +1 -0
- package/modules/valuation/dist/discounted-cash-flow.js +611 -0
- package/modules/valuation/dist/discounted-cash-flow.js.map +1 -0
- package/modules/valuation/dist/discounting.d.ts +124 -0
- package/modules/valuation/dist/discounting.d.ts.map +1 -0
- package/modules/valuation/dist/discounting.js +235 -0
- package/modules/valuation/dist/discounting.js.map +1 -0
- package/modules/valuation/dist/equity-valuation.d.ts +104 -0
- package/modules/valuation/dist/equity-valuation.d.ts.map +1 -0
- package/modules/valuation/dist/equity-valuation.js +164 -0
- package/modules/valuation/dist/equity-valuation.js.map +1 -0
- package/modules/valuation/dist/flows.d.ts +30 -0
- package/modules/valuation/dist/flows.d.ts.map +1 -0
- package/modules/valuation/dist/flows.js +77 -0
- package/modules/valuation/dist/flows.js.map +1 -0
- package/modules/valuation/dist/forecasting.d.ts +205 -0
- package/modules/valuation/dist/forecasting.d.ts.map +1 -0
- package/modules/valuation/dist/forecasting.js +359 -0
- package/modules/valuation/dist/forecasting.js.map +1 -0
- package/modules/valuation/dist/index.d.ts +9 -0
- package/modules/valuation/dist/index.d.ts.map +1 -0
- package/modules/valuation/dist/index.js +10 -0
- package/modules/valuation/dist/index.js.map +1 -0
- package/modules/valuation/dist/leveraged-buyout.d.ts +160 -0
- package/modules/valuation/dist/leveraged-buyout.d.ts.map +1 -0
- package/modules/valuation/dist/leveraged-buyout.js +326 -0
- package/modules/valuation/dist/leveraged-buyout.js.map +1 -0
- package/modules/valuation/dist/loans.d.ts +148 -0
- package/modules/valuation/dist/loans.d.ts.map +1 -0
- package/modules/valuation/dist/loans.js +518 -0
- package/modules/valuation/dist/loans.js.map +1 -0
- package/modules/valuation/dist/probabilistic.d.ts +88 -0
- package/modules/valuation/dist/probabilistic.d.ts.map +1 -0
- package/modules/valuation/dist/probabilistic.js +239 -0
- package/modules/valuation/dist/probabilistic.js.map +1 -0
- package/modules/valuation/dist/solvers.d.ts +90 -0
- package/modules/valuation/dist/solvers.d.ts.map +1 -0
- package/modules/valuation/dist/solvers.js +238 -0
- package/modules/valuation/dist/solvers.js.map +1 -0
- package/modules/valuation/etc/valuation.api.md +162 -0
- package/modules/valuation/src/adjusted-present-value.ts +181 -0
- package/modules/valuation/src/capital-budgeting.ts +329 -0
- package/modules/valuation/src/cash-flows.ts +11 -0
- package/modules/valuation/src/comparable.ts +340 -0
- package/modules/valuation/src/corporate-primitives.ts +665 -0
- package/modules/valuation/src/corporate.ts +36 -0
- package/modules/valuation/src/discounted-cash-flow.ts +1083 -0
- package/modules/valuation/src/discounting.ts +437 -0
- package/modules/valuation/src/equity-valuation.ts +313 -0
- package/modules/valuation/src/flows.ts +144 -0
- package/modules/valuation/src/forecasting.ts +666 -0
- package/modules/valuation/src/index.ts +10 -0
- package/modules/valuation/src/leveraged-buyout.ts +560 -0
- package/modules/valuation/src/loans.ts +778 -0
- package/modules/valuation/src/probabilistic.ts +438 -0
- package/modules/valuation/src/solvers.ts +397 -0
- package/modules/volatility/dist/analytics.d.ts +133 -0
- package/modules/volatility/dist/analytics.d.ts.map +1 -0
- package/modules/volatility/dist/analytics.js +320 -0
- package/modules/volatility/dist/analytics.js.map +1 -0
- package/modules/volatility/dist/arbitrage.d.ts +118 -0
- package/modules/volatility/dist/arbitrage.d.ts.map +1 -0
- package/modules/volatility/dist/arbitrage.js +397 -0
- package/modules/volatility/dist/arbitrage.js.map +1 -0
- package/modules/volatility/dist/artifacts.d.ts +24 -0
- package/modules/volatility/dist/artifacts.d.ts.map +1 -0
- package/modules/volatility/dist/artifacts.js +22 -0
- package/modules/volatility/dist/artifacts.js.map +1 -0
- package/modules/volatility/dist/calibration-limits.d.ts +13 -0
- package/modules/volatility/dist/calibration-limits.d.ts.map +1 -0
- package/modules/volatility/dist/calibration-limits.js +46 -0
- package/modules/volatility/dist/calibration-limits.js.map +1 -0
- package/modules/volatility/dist/calibration-start.d.ts +13 -0
- package/modules/volatility/dist/calibration-start.d.ts.map +1 -0
- package/modules/volatility/dist/calibration-start.js +55 -0
- package/modules/volatility/dist/calibration-start.js.map +1 -0
- package/modules/volatility/dist/earnings.d.ts +152 -0
- package/modules/volatility/dist/earnings.d.ts.map +1 -0
- package/modules/volatility/dist/earnings.js +340 -0
- package/modules/volatility/dist/earnings.js.map +1 -0
- package/modules/volatility/dist/essvi.d.ts +115 -0
- package/modules/volatility/dist/essvi.d.ts.map +1 -0
- package/modules/volatility/dist/essvi.js +362 -0
- package/modules/volatility/dist/essvi.js.map +1 -0
- package/modules/volatility/dist/estimate.d.ts +14 -0
- package/modules/volatility/dist/estimate.d.ts.map +1 -0
- package/modules/volatility/dist/estimate.js +18 -0
- package/modules/volatility/dist/estimate.js.map +1 -0
- package/modules/volatility/dist/event.d.ts +155 -0
- package/modules/volatility/dist/event.d.ts.map +1 -0
- package/modules/volatility/dist/event.js +319 -0
- package/modules/volatility/dist/event.js.map +1 -0
- package/modules/volatility/dist/fitted-model-artifacts.d.ts +378 -0
- package/modules/volatility/dist/fitted-model-artifacts.d.ts.map +1 -0
- package/modules/volatility/dist/fitted-model-artifacts.js +1139 -0
- package/modules/volatility/dist/fitted-model-artifacts.js.map +1 -0
- package/modules/volatility/dist/fitted-model-families.d.ts +287 -0
- package/modules/volatility/dist/fitted-model-families.d.ts.map +1 -0
- package/modules/volatility/dist/fitted-model-families.js +1251 -0
- package/modules/volatility/dist/fitted-model-families.js.map +1 -0
- package/modules/volatility/dist/forecast.d.ts +195 -0
- package/modules/volatility/dist/forecast.d.ts.map +1 -0
- package/modules/volatility/dist/forecast.js +493 -0
- package/modules/volatility/dist/forecast.js.map +1 -0
- package/modules/volatility/dist/generated/validation-specs.d.ts +12 -0
- package/modules/volatility/dist/generated/validation-specs.d.ts.map +1 -0
- package/modules/volatility/dist/generated/validation-specs.js +2181 -0
- package/modules/volatility/dist/generated/validation-specs.js.map +1 -0
- package/modules/volatility/dist/heston-surface.d.ts +67 -0
- package/modules/volatility/dist/heston-surface.d.ts.map +1 -0
- package/modules/volatility/dist/heston-surface.js +135 -0
- package/modules/volatility/dist/heston-surface.js.map +1 -0
- package/modules/volatility/dist/index.d.ts +64 -0
- package/modules/volatility/dist/index.d.ts.map +1 -0
- package/modules/volatility/dist/index.js +68 -0
- package/modules/volatility/dist/index.js.map +1 -0
- package/modules/volatility/dist/local-volatility.d.ts +34 -0
- package/modules/volatility/dist/local-volatility.d.ts.map +1 -0
- package/modules/volatility/dist/local-volatility.js +59 -0
- package/modules/volatility/dist/local-volatility.js.map +1 -0
- package/modules/volatility/dist/metrics.d.ts +41 -0
- package/modules/volatility/dist/metrics.d.ts.map +1 -0
- package/modules/volatility/dist/metrics.js +117 -0
- package/modules/volatility/dist/metrics.js.map +1 -0
- package/modules/volatility/dist/min-variance-delta.d.ts +61 -0
- package/modules/volatility/dist/min-variance-delta.d.ts.map +1 -0
- package/modules/volatility/dist/min-variance-delta.js +101 -0
- package/modules/volatility/dist/min-variance-delta.js.map +1 -0
- package/modules/volatility/dist/observed-skew.d.ts +137 -0
- package/modules/volatility/dist/observed-skew.d.ts.map +1 -0
- package/modules/volatility/dist/observed-skew.js +461 -0
- package/modules/volatility/dist/observed-skew.js.map +1 -0
- package/modules/volatility/dist/otm-strip.d.ts +39 -0
- package/modules/volatility/dist/otm-strip.d.ts.map +1 -0
- package/modules/volatility/dist/otm-strip.js +181 -0
- package/modules/volatility/dist/otm-strip.js.map +1 -0
- package/modules/volatility/dist/risk-reversal.d.ts +89 -0
- package/modules/volatility/dist/risk-reversal.d.ts.map +1 -0
- package/modules/volatility/dist/risk-reversal.js +176 -0
- package/modules/volatility/dist/risk-reversal.js.map +1 -0
- package/modules/volatility/dist/sabr-delta.d.ts +67 -0
- package/modules/volatility/dist/sabr-delta.d.ts.map +1 -0
- package/modules/volatility/dist/sabr-delta.js +153 -0
- package/modules/volatility/dist/sabr-delta.js.map +1 -0
- package/modules/volatility/dist/sabr.d.ts +62 -0
- package/modules/volatility/dist/sabr.d.ts.map +1 -0
- package/modules/volatility/dist/sabr.js +262 -0
- package/modules/volatility/dist/sabr.js.map +1 -0
- package/modules/volatility/dist/skew.d.ts +63 -0
- package/modules/volatility/dist/skew.d.ts.map +1 -0
- package/modules/volatility/dist/skew.js +147 -0
- package/modules/volatility/dist/skew.js.map +1 -0
- package/modules/volatility/dist/ssvi-kernel.d.ts +90 -0
- package/modules/volatility/dist/ssvi-kernel.d.ts.map +1 -0
- package/modules/volatility/dist/ssvi-kernel.js +103 -0
- package/modules/volatility/dist/ssvi-kernel.js.map +1 -0
- package/modules/volatility/dist/ssvi.d.ts +181 -0
- package/modules/volatility/dist/ssvi.d.ts.map +1 -0
- package/modules/volatility/dist/ssvi.js +490 -0
- package/modules/volatility/dist/ssvi.js.map +1 -0
- package/modules/volatility/dist/sticky-regime.d.ts +47 -0
- package/modules/volatility/dist/sticky-regime.d.ts.map +1 -0
- package/modules/volatility/dist/sticky-regime.js +81 -0
- package/modules/volatility/dist/sticky-regime.js.map +1 -0
- package/modules/volatility/dist/surface-pca.d.ts +111 -0
- package/modules/volatility/dist/surface-pca.d.ts.map +1 -0
- package/modules/volatility/dist/surface-pca.js +297 -0
- package/modules/volatility/dist/surface-pca.js.map +1 -0
- package/modules/volatility/dist/surface.d.ts +286 -0
- package/modules/volatility/dist/surface.d.ts.map +1 -0
- package/modules/volatility/dist/surface.js +1105 -0
- package/modules/volatility/dist/surface.js.map +1 -0
- package/modules/volatility/dist/svi.d.ts +133 -0
- package/modules/volatility/dist/svi.d.ts.map +1 -0
- package/modules/volatility/dist/svi.js +491 -0
- package/modules/volatility/dist/svi.js.map +1 -0
- package/modules/volatility/dist/swaption-cube.d.ts +125 -0
- package/modules/volatility/dist/swaption-cube.d.ts.map +1 -0
- package/modules/volatility/dist/swaption-cube.js +334 -0
- package/modules/volatility/dist/swaption-cube.js.map +1 -0
- package/modules/volatility/dist/tail-risk.d.ts +65 -0
- package/modules/volatility/dist/tail-risk.d.ts.map +1 -0
- package/modules/volatility/dist/tail-risk.js +155 -0
- package/modules/volatility/dist/tail-risk.js.map +1 -0
- package/modules/volatility/dist/term.d.ts +121 -0
- package/modules/volatility/dist/term.d.ts.map +1 -0
- package/modules/volatility/dist/term.js +336 -0
- package/modules/volatility/dist/term.js.map +1 -0
- package/modules/volatility/dist/vanna-volga.d.ts +278 -0
- package/modules/volatility/dist/vanna-volga.d.ts.map +1 -0
- package/modules/volatility/dist/vanna-volga.js +833 -0
- package/modules/volatility/dist/vanna-volga.js.map +1 -0
- package/modules/volatility/dist/variance-index.d.ts +101 -0
- package/modules/volatility/dist/variance-index.d.ts.map +1 -0
- package/modules/volatility/dist/variance-index.js +240 -0
- package/modules/volatility/dist/variance-index.js.map +1 -0
- package/modules/volatility/dist/volatility-spot-beta.d.ts +57 -0
- package/modules/volatility/dist/volatility-spot-beta.d.ts.map +1 -0
- package/modules/volatility/dist/volatility-spot-beta.js +136 -0
- package/modules/volatility/dist/volatility-spot-beta.js.map +1 -0
- package/modules/volatility/etc/volatility.api.md +207 -0
- package/modules/volatility/src/analytics.ts +513 -0
- package/modules/volatility/src/arbitrage.ts +561 -0
- package/modules/volatility/src/artifacts.ts +62 -0
- package/modules/volatility/src/calibration-limits.ts +61 -0
- package/modules/volatility/src/calibration-start.ts +79 -0
- package/modules/volatility/src/earnings.ts +548 -0
- package/modules/volatility/src/essvi.ts +528 -0
- package/modules/volatility/src/estimate.ts +21 -0
- package/modules/volatility/src/event.ts +542 -0
- package/modules/volatility/src/fitted-model-artifacts.ts +1844 -0
- package/modules/volatility/src/fitted-model-families.ts +1681 -0
- package/modules/volatility/src/forecast.ts +757 -0
- package/modules/volatility/src/generated/validation-specs.ts +2184 -0
- package/modules/volatility/src/heston-surface.ts +215 -0
- package/modules/volatility/src/index.ts +285 -0
- package/modules/volatility/src/local-volatility.ts +104 -0
- package/modules/volatility/src/metrics.ts +176 -0
- package/modules/volatility/src/min-variance-delta.ts +167 -0
- package/modules/volatility/src/observed-skew.ts +684 -0
- package/modules/volatility/src/otm-strip.ts +234 -0
- package/modules/volatility/src/risk-reversal.ts +316 -0
- package/modules/volatility/src/sabr-delta.ts +238 -0
- package/modules/volatility/src/sabr.ts +375 -0
- package/modules/volatility/src/skew.ts +244 -0
- package/modules/volatility/src/ssvi-kernel.ts +134 -0
- package/modules/volatility/src/ssvi.ts +707 -0
- package/modules/volatility/src/sticky-regime.ts +150 -0
- package/modules/volatility/src/surface-pca.ts +439 -0
- package/modules/volatility/src/surface.ts +1499 -0
- package/modules/volatility/src/svi.ts +687 -0
- package/modules/volatility/src/swaption-cube.ts +539 -0
- package/modules/volatility/src/tail-risk.ts +254 -0
- package/modules/volatility/src/term.ts +587 -0
- package/modules/volatility/src/vanna-volga.ts +1337 -0
- package/modules/volatility/src/variance-index.ts +396 -0
- package/modules/volatility/src/volatility-spot-beta.ts +252 -0
- package/modules/workflows/dist/capabilities.d.ts +8 -0
- package/modules/workflows/dist/capabilities.d.ts.map +1 -0
- package/modules/workflows/dist/capabilities.js +50 -0
- package/modules/workflows/dist/capabilities.js.map +1 -0
- package/modules/workflows/dist/envelope-schema.d.ts +36 -0
- package/modules/workflows/dist/envelope-schema.d.ts.map +1 -0
- package/modules/workflows/dist/envelope-schema.js +152 -0
- package/modules/workflows/dist/envelope-schema.js.map +1 -0
- package/modules/workflows/dist/index.d.ts +33 -0
- package/modules/workflows/dist/index.d.ts.map +1 -0
- package/modules/workflows/dist/index.js +27 -0
- package/modules/workflows/dist/index.js.map +1 -0
- package/modules/workflows/dist/json-safe.d.ts +7 -0
- package/modules/workflows/dist/json-safe.d.ts.map +1 -0
- package/modules/workflows/dist/json-safe.js +23 -0
- package/modules/workflows/dist/json-safe.js.map +1 -0
- package/modules/workflows/dist/local/file-lock.d.ts +23 -0
- package/modules/workflows/dist/local/file-lock.d.ts.map +1 -0
- package/modules/workflows/dist/local/file-lock.js +198 -0
- package/modules/workflows/dist/local/file-lock.js.map +1 -0
- package/modules/workflows/dist/local/file-stores.d.ts +33 -0
- package/modules/workflows/dist/local/file-stores.d.ts.map +1 -0
- package/modules/workflows/dist/local/file-stores.js +376 -0
- package/modules/workflows/dist/local/file-stores.js.map +1 -0
- package/modules/workflows/dist/local/index.d.ts +15 -0
- package/modules/workflows/dist/local/index.d.ts.map +1 -0
- package/modules/workflows/dist/local/index.js +12 -0
- package/modules/workflows/dist/local/index.js.map +1 -0
- package/modules/workflows/dist/local/job-worker.d.ts +28 -0
- package/modules/workflows/dist/local/job-worker.d.ts.map +1 -0
- package/modules/workflows/dist/local/job-worker.js +56 -0
- package/modules/workflows/dist/local/job-worker.js.map +1 -0
- package/modules/workflows/dist/local/jobs.d.ts +51 -0
- package/modules/workflows/dist/local/jobs.d.ts.map +1 -0
- package/modules/workflows/dist/local/jobs.js +313 -0
- package/modules/workflows/dist/local/jobs.js.map +1 -0
- package/modules/workflows/dist/local/local-runner.d.ts +39 -0
- package/modules/workflows/dist/local/local-runner.d.ts.map +1 -0
- package/modules/workflows/dist/local/local-runner.js +102 -0
- package/modules/workflows/dist/local/local-runner.js.map +1 -0
- package/modules/workflows/dist/local/profiles.d.ts +27 -0
- package/modules/workflows/dist/local/profiles.d.ts.map +1 -0
- package/modules/workflows/dist/local/profiles.js +77 -0
- package/modules/workflows/dist/local/profiles.js.map +1 -0
- package/modules/workflows/dist/operation-kit.d.ts +10 -0
- package/modules/workflows/dist/operation-kit.d.ts.map +1 -0
- package/modules/workflows/dist/operation-kit.js +193 -0
- package/modules/workflows/dist/operation-kit.js.map +1 -0
- package/modules/workflows/dist/operation.d.ts +210 -0
- package/modules/workflows/dist/operation.d.ts.map +1 -0
- package/modules/workflows/dist/operation.js +255 -0
- package/modules/workflows/dist/operation.js.map +1 -0
- package/modules/workflows/dist/operations-analysis.d.ts +188 -0
- package/modules/workflows/dist/operations-analysis.d.ts.map +1 -0
- package/modules/workflows/dist/operations-analysis.js +908 -0
- package/modules/workflows/dist/operations-analysis.js.map +1 -0
- package/modules/workflows/dist/operations-compute.d.ts +21 -0
- package/modules/workflows/dist/operations-compute.d.ts.map +1 -0
- package/modules/workflows/dist/operations-compute.js +1227 -0
- package/modules/workflows/dist/operations-compute.js.map +1 -0
- package/modules/workflows/dist/operations-journey.d.ts +27 -0
- package/modules/workflows/dist/operations-journey.d.ts.map +1 -0
- package/modules/workflows/dist/operations-journey.js +2445 -0
- package/modules/workflows/dist/operations-journey.js.map +1 -0
- package/modules/workflows/dist/operations-trade.d.ts +3 -0
- package/modules/workflows/dist/operations-trade.d.ts.map +1 -0
- package/modules/workflows/dist/operations-trade.js +648 -0
- package/modules/workflows/dist/operations-trade.js.map +1 -0
- package/modules/workflows/dist/preview.d.ts +16 -0
- package/modules/workflows/dist/preview.d.ts.map +1 -0
- package/modules/workflows/dist/preview.js +30 -0
- package/modules/workflows/dist/preview.js.map +1 -0
- package/modules/workflows/dist/registry.d.ts +26 -0
- package/modules/workflows/dist/registry.d.ts.map +1 -0
- package/modules/workflows/dist/registry.js +110 -0
- package/modules/workflows/dist/registry.js.map +1 -0
- package/modules/workflows/dist/runtime.d.ts +76 -0
- package/modules/workflows/dist/runtime.d.ts.map +1 -0
- package/modules/workflows/dist/runtime.js +445 -0
- package/modules/workflows/dist/runtime.js.map +1 -0
- package/modules/workflows/dist/stores-trade.d.ts +101 -0
- package/modules/workflows/dist/stores-trade.d.ts.map +1 -0
- package/modules/workflows/dist/stores-trade.js +275 -0
- package/modules/workflows/dist/stores-trade.js.map +1 -0
- package/modules/workflows/dist/stores.d.ts +109 -0
- package/modules/workflows/dist/stores.d.ts.map +1 -0
- package/modules/workflows/dist/stores.js +393 -0
- package/modules/workflows/dist/stores.js.map +1 -0
- package/modules/workflows/dist/trade-wire-common-schemas.d.ts +57 -0
- package/modules/workflows/dist/trade-wire-common-schemas.d.ts.map +1 -0
- package/modules/workflows/dist/trade-wire-common-schemas.js +286 -0
- package/modules/workflows/dist/trade-wire-common-schemas.js.map +1 -0
- package/modules/workflows/dist/trade-wire-ledger-schemas.d.ts +102 -0
- package/modules/workflows/dist/trade-wire-ledger-schemas.d.ts.map +1 -0
- package/modules/workflows/dist/trade-wire-ledger-schemas.js +321 -0
- package/modules/workflows/dist/trade-wire-ledger-schemas.js.map +1 -0
- package/modules/workflows/dist/trade-wire-market-schemas.d.ts +5 -0
- package/modules/workflows/dist/trade-wire-market-schemas.d.ts.map +1 -0
- package/modules/workflows/dist/trade-wire-market-schemas.js +84 -0
- package/modules/workflows/dist/trade-wire-market-schemas.js.map +1 -0
- package/modules/workflows/dist/trade-wire-schemas.d.ts +1134 -0
- package/modules/workflows/dist/trade-wire-schemas.d.ts.map +1 -0
- package/modules/workflows/dist/trade-wire-schemas.js +755 -0
- package/modules/workflows/dist/trade-wire-schemas.js.map +1 -0
- package/modules/workflows/dist/version.d.ts +3 -0
- package/modules/workflows/dist/version.d.ts.map +1 -0
- package/modules/workflows/dist/version.js +3 -0
- package/modules/workflows/dist/version.js.map +1 -0
- package/modules/workflows/dist/wire-schemas.d.ts +84 -0
- package/modules/workflows/dist/wire-schemas.d.ts.map +1 -0
- package/modules/workflows/dist/wire-schemas.js +88 -0
- package/modules/workflows/dist/wire-schemas.js.map +1 -0
- package/modules/workflows/etc/workflows.api.md +95 -0
- package/modules/workflows/src/capabilities.ts +67 -0
- package/modules/workflows/src/envelope-schema.ts +170 -0
- package/modules/workflows/src/index.ts +118 -0
- package/modules/workflows/src/json-safe.ts +19 -0
- package/modules/workflows/src/local/file-lock.ts +200 -0
- package/modules/workflows/src/local/file-stores.ts +452 -0
- package/modules/workflows/src/local/index.ts +20 -0
- package/modules/workflows/src/local/job-worker.ts +74 -0
- package/modules/workflows/src/local/jobs.ts +458 -0
- package/modules/workflows/src/local/local-runner.ts +170 -0
- package/modules/workflows/src/local/profiles.ts +113 -0
- package/modules/workflows/src/operation-kit.ts +234 -0
- package/modules/workflows/src/operation.ts +607 -0
- package/modules/workflows/src/operations-analysis.ts +1058 -0
- package/modules/workflows/src/operations-compute.ts +1458 -0
- package/modules/workflows/src/operations-journey.ts +2744 -0
- package/modules/workflows/src/operations-trade.ts +946 -0
- package/modules/workflows/src/preview.ts +34 -0
- package/modules/workflows/src/registry.ts +150 -0
- package/modules/workflows/src/runtime.ts +633 -0
- package/modules/workflows/src/stores-trade.ts +463 -0
- package/modules/workflows/src/stores.ts +608 -0
- package/modules/workflows/src/trade-wire-common-schemas.ts +337 -0
- package/modules/workflows/src/trade-wire-ledger-schemas.ts +359 -0
- package/modules/workflows/src/trade-wire-market-schemas.ts +103 -0
- package/modules/workflows/src/trade-wire-schemas.ts +906 -0
- package/modules/workflows/src/version.ts +2 -0
- package/modules/workflows/src/wire-schemas.ts +100 -0
- package/package.json +1008 -0
|
@@ -0,0 +1,1772 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modern momentum / oscillator coverage (spec §13.3; pandas-ta parity) — part 1.
|
|
3
|
+
*
|
|
4
|
+
* bias, CFO, forecast oscillator, Coppock, CTI, efficiency ratio, center of gravity, psychological
|
|
5
|
+
* line, slope, PVO, Elder Ray, BRAR, KDJ, RVGI, PGO, TRIX histogram, SMI Ergodic, volume-weighted
|
|
6
|
+
* MACD. Each composes the proven base streams and is a serializable batch+stream facade. (RSI, MACD,
|
|
7
|
+
* Stochastic and the Phase-4 oscillators live in their own modules; the harder cycle-style oscillators
|
|
8
|
+
* — QQE, RSX, Schaff, Laguerre, TD Sequential, Squeeze — land in the next slice.)
|
|
9
|
+
*/
|
|
10
|
+
import * as builtinMetadata from './builtin-metadata.js';
|
|
11
|
+
import { withBuiltinMetadata } from './indicator-metadata.js';
|
|
12
|
+
import { ErrorCode, InputError, requireArgumentObject, requireFiniteFields, } from '../../core/dist/index.js';
|
|
13
|
+
import { makeIndicator, snapshotOf, readSnapshot, } from './framework.js';
|
|
14
|
+
import {} from './macd.js';
|
|
15
|
+
import { EmaStream, SmaStream, VwmaStream, WmaStream } from './moving-averages.js';
|
|
16
|
+
import { RocStream, TrixStream, TsiStream } from './oscillators.js';
|
|
17
|
+
import { RsiStream } from './rsi.js';
|
|
18
|
+
import { LinregStream } from './trend.js';
|
|
19
|
+
import { RviStream } from './volatility.js';
|
|
20
|
+
import { dirtyRows, dirtySamples, isDirtySample } from './nan-policy.js';
|
|
21
|
+
import { requireInRange, requirePeriod, requirePositive } from './validate.js';
|
|
22
|
+
import { requireStreamParameters } from './stream-validation.js';
|
|
23
|
+
const nan = () => NaN;
|
|
24
|
+
class BiasStream {
|
|
25
|
+
sma;
|
|
26
|
+
value = null;
|
|
27
|
+
constructor(period) {
|
|
28
|
+
requirePeriod(period, 'BiasStream');
|
|
29
|
+
this.sma = new SmaStream(period);
|
|
30
|
+
}
|
|
31
|
+
next(value) {
|
|
32
|
+
const m = this.sma.next(value);
|
|
33
|
+
this.value = m === null ? null : m === 0 ? NaN : ((value - m) / m) * 100;
|
|
34
|
+
return this.value;
|
|
35
|
+
}
|
|
36
|
+
toJSON() {
|
|
37
|
+
return snapshotOf('bias', { sma: this.sma.toJSON(), value: this.value });
|
|
38
|
+
}
|
|
39
|
+
static fromJSON(snapshot) {
|
|
40
|
+
const state = readSnapshot(snapshot, 'bias');
|
|
41
|
+
const x = new BiasStream(1);
|
|
42
|
+
x.sma = SmaStream.fromJSON(state.child('sma'));
|
|
43
|
+
x.value = state.cached('value');
|
|
44
|
+
return x;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export const bias = withBuiltinMetadata(makeIndicator((p) => new BiasStream(requirePeriod(p.period ?? 26, 'bias')), BiasStream.fromJSON, nan), builtinMetadata.biasMetadata);
|
|
48
|
+
// ───────────────────────── CFO / forecast oscillator ─────────────────────────
|
|
49
|
+
class LinregOscStream {
|
|
50
|
+
lin;
|
|
51
|
+
value = null;
|
|
52
|
+
kind;
|
|
53
|
+
useForecast;
|
|
54
|
+
constructor(parameters) {
|
|
55
|
+
requireStreamParameters('LinregOscStream.constructor#0', 'LinregOscStream', parameters);
|
|
56
|
+
const { period, kind, useForecast } = parameters;
|
|
57
|
+
this.kind = kind;
|
|
58
|
+
this.useForecast = useForecast;
|
|
59
|
+
this.lin = new LinregStream(period);
|
|
60
|
+
}
|
|
61
|
+
next(value) {
|
|
62
|
+
const r = this.lin.next(value);
|
|
63
|
+
if (r === null) {
|
|
64
|
+
this.value = null;
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
const ref = this.useForecast ? r.forecast : r.value;
|
|
68
|
+
this.value = value === 0 ? NaN : ((value - ref) / value) * 100;
|
|
69
|
+
return this.value;
|
|
70
|
+
}
|
|
71
|
+
toJSON() {
|
|
72
|
+
// `useForecast` is NOT serialized: `LinregOscStream.restore(kind, useForecast)` is bound to it,
|
|
73
|
+
// so a stored copy would be a field nothing reads — change it and the restore ignores you.
|
|
74
|
+
return snapshotOf(this.kind, {
|
|
75
|
+
lin: this.lin.toJSON(),
|
|
76
|
+
value: this.value,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
static restore(kind, useForecast) {
|
|
80
|
+
return (s) => {
|
|
81
|
+
const state = readSnapshot(s, kind);
|
|
82
|
+
const x = new LinregOscStream({ period: 1, kind, useForecast });
|
|
83
|
+
x.lin = LinregStream.fromJSON(state.child('lin'));
|
|
84
|
+
x.value = state.cached('value');
|
|
85
|
+
return x;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/** Chande Forecast Oscillator: % distance of price from its linear-regression value. */
|
|
90
|
+
export const cfo = withBuiltinMetadata(makeIndicator((p) => new LinregOscStream({
|
|
91
|
+
period: requirePeriod(p.period ?? 14, 'cfo'),
|
|
92
|
+
kind: 'cfo',
|
|
93
|
+
useForecast: false,
|
|
94
|
+
}), LinregOscStream.restore('cfo', false), nan), builtinMetadata.cfoMetadata);
|
|
95
|
+
/** Forecast Oscillator: % distance of price from its time-series forecast (one bar ahead). */
|
|
96
|
+
export const forecastOscillator = withBuiltinMetadata(makeIndicator((p) => new LinregOscStream({
|
|
97
|
+
period: requirePeriod(p.period ?? 14, 'forecastOscillator'),
|
|
98
|
+
kind: 'forecastOscillator',
|
|
99
|
+
useForecast: true,
|
|
100
|
+
}), LinregOscStream.restore('forecastOscillator', true), nan), builtinMetadata.forecastOscillatorMetadata);
|
|
101
|
+
class CoppockStream {
|
|
102
|
+
rocLong;
|
|
103
|
+
rocShort;
|
|
104
|
+
wma;
|
|
105
|
+
value = null;
|
|
106
|
+
constructor(parameters) {
|
|
107
|
+
requireStreamParameters('CoppockStream.constructor#0', 'CoppockStream', parameters);
|
|
108
|
+
const { longRoc, shortRoc, wmaPeriod } = parameters;
|
|
109
|
+
this.rocLong = new RocStream({ period: longRoc, mode: 'roc' });
|
|
110
|
+
this.rocShort = new RocStream({ period: shortRoc, mode: 'roc' });
|
|
111
|
+
this.wma = new WmaStream(wmaPeriod);
|
|
112
|
+
}
|
|
113
|
+
next(value) {
|
|
114
|
+
const rl = this.rocLong.next(value);
|
|
115
|
+
const rs = this.rocShort.next(value);
|
|
116
|
+
if (rl === null || rs === null) {
|
|
117
|
+
this.value = null;
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
this.value = this.wma.next(rl + rs);
|
|
121
|
+
return this.value;
|
|
122
|
+
}
|
|
123
|
+
toJSON() {
|
|
124
|
+
return snapshotOf('coppock', {
|
|
125
|
+
rocLong: this.rocLong.toJSON(),
|
|
126
|
+
rocShort: this.rocShort.toJSON(),
|
|
127
|
+
wma: this.wma.toJSON(),
|
|
128
|
+
value: this.value,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
static fromJSON(snapshot) {
|
|
132
|
+
const state = readSnapshot(snapshot, 'coppock');
|
|
133
|
+
const x = new CoppockStream({ longRoc: 1, shortRoc: 1, wmaPeriod: 1 });
|
|
134
|
+
x.rocLong = RocStream.restore('roc')(state.child('rocLong'));
|
|
135
|
+
x.rocShort = RocStream.restore('roc')(state.child('rocShort'));
|
|
136
|
+
x.wma = WmaStream.fromJSON(state.child('wma'));
|
|
137
|
+
x.value = state.cached('value');
|
|
138
|
+
return x;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
export const coppock = withBuiltinMetadata(makeIndicator((p) => new CoppockStream({
|
|
142
|
+
longRoc: requirePeriod(p.longRoc ?? 14, 'coppock', 'longRoc'),
|
|
143
|
+
shortRoc: requirePeriod(p.shortRoc ?? 11, 'coppock', 'shortRoc'),
|
|
144
|
+
wmaPeriod: requirePeriod(p.wma ?? 10, 'coppock', 'wma'),
|
|
145
|
+
}), CoppockStream.fromJSON, nan), builtinMetadata.coppockMetadata);
|
|
146
|
+
// ───────────────────────── CTI (correlation trend, Ehlers) ─────────────────────────
|
|
147
|
+
class CtiStream {
|
|
148
|
+
period;
|
|
149
|
+
buf = [];
|
|
150
|
+
sumX;
|
|
151
|
+
sumX2;
|
|
152
|
+
value = null;
|
|
153
|
+
constructor(period) {
|
|
154
|
+
this.period = period;
|
|
155
|
+
requirePeriod(period, 'CtiStream');
|
|
156
|
+
const n = period;
|
|
157
|
+
this.sumX = (n * (n - 1)) / 2;
|
|
158
|
+
this.sumX2 = ((n - 1) * n * (2 * n - 1)) / 6;
|
|
159
|
+
}
|
|
160
|
+
next(value) {
|
|
161
|
+
this.buf.push(value);
|
|
162
|
+
if (this.buf.length > this.period)
|
|
163
|
+
this.buf.shift();
|
|
164
|
+
if (this.buf.length < this.period) {
|
|
165
|
+
this.value = null;
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
const n = this.period;
|
|
169
|
+
let sumY = 0;
|
|
170
|
+
let sumXY = 0;
|
|
171
|
+
let sumY2 = 0;
|
|
172
|
+
for (let i = 0; i < n; i++) {
|
|
173
|
+
const y = this.buf[i];
|
|
174
|
+
sumY += y;
|
|
175
|
+
sumXY += i * y;
|
|
176
|
+
sumY2 += y * y;
|
|
177
|
+
}
|
|
178
|
+
const denom = Math.sqrt((n * this.sumX2 - this.sumX * this.sumX) * (n * sumY2 - sumY * sumY));
|
|
179
|
+
this.value = denom === 0 ? 0 : (n * sumXY - this.sumX * sumY) / denom;
|
|
180
|
+
return this.value;
|
|
181
|
+
}
|
|
182
|
+
toJSON() {
|
|
183
|
+
return snapshotOf('cti', { period: this.period, buf: [...this.buf], value: this.value });
|
|
184
|
+
}
|
|
185
|
+
static fromJSON(snapshot) {
|
|
186
|
+
const state = readSnapshot(snapshot, 'cti');
|
|
187
|
+
const x = new CtiStream(state.lookback('period'));
|
|
188
|
+
x.buf = state.numbers('buf');
|
|
189
|
+
x.value = state.cached('value');
|
|
190
|
+
return x;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
export const cti = withBuiltinMetadata(makeIndicator((p) => new CtiStream(requirePeriod(p.period ?? 12, 'cti')), CtiStream.fromJSON, nan), builtinMetadata.ctiMetadata);
|
|
194
|
+
// ───────────────────────── efficiency ratio (Kaufman) ─────────────────────────
|
|
195
|
+
class EfficiencyRatioStream {
|
|
196
|
+
period;
|
|
197
|
+
prices = [];
|
|
198
|
+
diffs = [];
|
|
199
|
+
volatilitySum = 0;
|
|
200
|
+
/** Non-finite samples inside the window — the interior-NaN gate (see `./nan-policy`). */
|
|
201
|
+
nanCount = 0;
|
|
202
|
+
value = null;
|
|
203
|
+
constructor(period) {
|
|
204
|
+
this.period = period;
|
|
205
|
+
requirePeriod(period, 'EfficiencyRatioStream');
|
|
206
|
+
}
|
|
207
|
+
next(value) {
|
|
208
|
+
if (this.prices.length > 0) {
|
|
209
|
+
const d = Math.abs(value - this.prices[this.prices.length - 1]);
|
|
210
|
+
this.diffs.push(d);
|
|
211
|
+
// Interior-NaN policy: only finite deltas enter the running sum.
|
|
212
|
+
if (isDirtySample(d))
|
|
213
|
+
this.nanCount++;
|
|
214
|
+
else
|
|
215
|
+
this.volatilitySum += d;
|
|
216
|
+
if (this.diffs.length > this.period) {
|
|
217
|
+
const gone = this.diffs.shift();
|
|
218
|
+
if (isDirtySample(gone))
|
|
219
|
+
this.nanCount--;
|
|
220
|
+
else
|
|
221
|
+
this.volatilitySum -= gone;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
this.prices.push(value);
|
|
225
|
+
if (this.prices.length > this.period + 1)
|
|
226
|
+
this.prices.shift();
|
|
227
|
+
if (this.diffs.length < this.period) {
|
|
228
|
+
this.value = null;
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
if (this.nanCount > 0) {
|
|
232
|
+
this.value = NaN;
|
|
233
|
+
return this.value;
|
|
234
|
+
}
|
|
235
|
+
const change = Math.abs(value - this.prices[0]);
|
|
236
|
+
this.value = this.volatilitySum === 0 ? 0 : change / this.volatilitySum;
|
|
237
|
+
return this.value;
|
|
238
|
+
}
|
|
239
|
+
toJSON() {
|
|
240
|
+
return snapshotOf('efficiencyRatio', {
|
|
241
|
+
period: this.period,
|
|
242
|
+
prices: [...this.prices],
|
|
243
|
+
diffs: [...this.diffs],
|
|
244
|
+
volatilitySum: this.volatilitySum,
|
|
245
|
+
value: this.value,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
static fromJSON(snapshot) {
|
|
249
|
+
const state = readSnapshot(snapshot, 'efficiencyRatio');
|
|
250
|
+
const x = new EfficiencyRatioStream(state.lookback('period'));
|
|
251
|
+
Object.assign(x, { volatilitySum: state.number('volatilitySum') });
|
|
252
|
+
x.prices = state.numbers('prices');
|
|
253
|
+
x.diffs = state.numbers('diffs');
|
|
254
|
+
x.nanCount = dirtySamples(x.diffs);
|
|
255
|
+
x.value = state.cached('value');
|
|
256
|
+
return x;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
export const efficiencyRatio = withBuiltinMetadata(makeIndicator((p) => new EfficiencyRatioStream(requirePeriod(p.period ?? 10, 'efficiencyRatio')), EfficiencyRatioStream.fromJSON, nan), builtinMetadata.efficiencyRatioMetadata);
|
|
260
|
+
// ───────────────────────── center of gravity (Ehlers) ─────────────────────────
|
|
261
|
+
class CenterOfGravityStream {
|
|
262
|
+
period;
|
|
263
|
+
buf = [];
|
|
264
|
+
value = null;
|
|
265
|
+
constructor(period) {
|
|
266
|
+
this.period = period;
|
|
267
|
+
requirePeriod(period, 'CenterOfGravityStream');
|
|
268
|
+
}
|
|
269
|
+
next(value) {
|
|
270
|
+
this.buf.push(value);
|
|
271
|
+
if (this.buf.length > this.period)
|
|
272
|
+
this.buf.shift();
|
|
273
|
+
if (this.buf.length < this.period) {
|
|
274
|
+
this.value = null;
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
const n = this.period;
|
|
278
|
+
let num = 0;
|
|
279
|
+
let den = 0;
|
|
280
|
+
for (let i = 0; i < n; i++) {
|
|
281
|
+
const price = this.buf[n - 1 - i]; // i bars ago (0 = current)
|
|
282
|
+
num += (1 + i) * price;
|
|
283
|
+
den += price;
|
|
284
|
+
}
|
|
285
|
+
this.value = den === 0 ? 0 : -num / den + (n + 1) / 2;
|
|
286
|
+
return this.value;
|
|
287
|
+
}
|
|
288
|
+
toJSON() {
|
|
289
|
+
return snapshotOf('centerOfGravity', {
|
|
290
|
+
period: this.period,
|
|
291
|
+
buf: [...this.buf],
|
|
292
|
+
value: this.value,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
static fromJSON(snapshot) {
|
|
296
|
+
const state = readSnapshot(snapshot, 'centerOfGravity');
|
|
297
|
+
const x = new CenterOfGravityStream(state.lookback('period'));
|
|
298
|
+
x.buf = state.numbers('buf');
|
|
299
|
+
x.value = state.cached('value');
|
|
300
|
+
return x;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
export const centerOfGravity = withBuiltinMetadata(makeIndicator((p) => new CenterOfGravityStream(requirePeriod(p.period ?? 10, 'centerOfGravity')), CenterOfGravityStream.fromJSON, nan), builtinMetadata.centerOfGravityMetadata);
|
|
304
|
+
// ───────────────────────── psychological line ─────────────────────────
|
|
305
|
+
class PsychologicalLineStream {
|
|
306
|
+
period;
|
|
307
|
+
prev = null;
|
|
308
|
+
ups = [];
|
|
309
|
+
sum = 0;
|
|
310
|
+
/** Non-finite samples inside the window — the interior-NaN gate (see `./nan-policy`). */
|
|
311
|
+
nanCount = 0;
|
|
312
|
+
value = null;
|
|
313
|
+
constructor(period) {
|
|
314
|
+
this.period = period;
|
|
315
|
+
requirePeriod(period, 'PsychologicalLineStream');
|
|
316
|
+
}
|
|
317
|
+
next(value) {
|
|
318
|
+
if (this.prev === null) {
|
|
319
|
+
this.prev = value;
|
|
320
|
+
this.value = null;
|
|
321
|
+
return null;
|
|
322
|
+
}
|
|
323
|
+
// A non-finite bar is not an "up" bar under `>`; recording it as 0 would understate the ratio
|
|
324
|
+
// with no disclosure, so it enters the window as NaN and gates the output instead.
|
|
325
|
+
const bad = isDirtySample(value) || isDirtySample(this.prev);
|
|
326
|
+
const up = bad ? NaN : value > this.prev ? 1 : 0;
|
|
327
|
+
this.prev = value;
|
|
328
|
+
this.ups.push(up);
|
|
329
|
+
if (bad)
|
|
330
|
+
this.nanCount++;
|
|
331
|
+
else
|
|
332
|
+
this.sum += up;
|
|
333
|
+
if (this.ups.length > this.period) {
|
|
334
|
+
const gone = this.ups.shift();
|
|
335
|
+
if (isDirtySample(gone))
|
|
336
|
+
this.nanCount--;
|
|
337
|
+
else
|
|
338
|
+
this.sum -= gone;
|
|
339
|
+
}
|
|
340
|
+
if (this.ups.length < this.period) {
|
|
341
|
+
this.value = null;
|
|
342
|
+
return null;
|
|
343
|
+
}
|
|
344
|
+
if (this.nanCount > 0) {
|
|
345
|
+
this.value = NaN;
|
|
346
|
+
return this.value;
|
|
347
|
+
}
|
|
348
|
+
this.value = (100 * this.sum) / this.period;
|
|
349
|
+
return this.value;
|
|
350
|
+
}
|
|
351
|
+
toJSON() {
|
|
352
|
+
return snapshotOf('psychologicalLine', {
|
|
353
|
+
period: this.period,
|
|
354
|
+
prev: this.prev,
|
|
355
|
+
ups: [...this.ups],
|
|
356
|
+
sum: this.sum,
|
|
357
|
+
value: this.value,
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
static fromJSON(snapshot) {
|
|
361
|
+
const state = readSnapshot(snapshot, 'psychologicalLine');
|
|
362
|
+
const x = new PsychologicalLineStream(state.lookback('period'));
|
|
363
|
+
Object.assign(x, { prev: state.numberOrNull('prev'), sum: state.number('sum') });
|
|
364
|
+
x.ups = state.numbers('ups');
|
|
365
|
+
x.nanCount = dirtySamples(x.ups);
|
|
366
|
+
x.value = state.cached('value');
|
|
367
|
+
return x;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
export const psychologicalLine = withBuiltinMetadata(makeIndicator((p) => new PsychologicalLineStream(requirePeriod(p.period ?? 12, 'psychologicalLine')), PsychologicalLineStream.fromJSON, nan), builtinMetadata.psychologicalLineMetadata);
|
|
371
|
+
// ───────────────────────── slope (rise / run) ─────────────────────────
|
|
372
|
+
class SlopeStream {
|
|
373
|
+
period;
|
|
374
|
+
buf = [];
|
|
375
|
+
value = null;
|
|
376
|
+
constructor(period) {
|
|
377
|
+
this.period = period;
|
|
378
|
+
requirePeriod(period, 'SlopeStream');
|
|
379
|
+
}
|
|
380
|
+
next(value) {
|
|
381
|
+
this.buf.push(value);
|
|
382
|
+
if (this.buf.length > this.period + 1)
|
|
383
|
+
this.buf.shift();
|
|
384
|
+
if (this.buf.length < this.period + 1) {
|
|
385
|
+
this.value = null;
|
|
386
|
+
return null;
|
|
387
|
+
}
|
|
388
|
+
this.value = (value - this.buf[0]) / this.period;
|
|
389
|
+
return this.value;
|
|
390
|
+
}
|
|
391
|
+
toJSON() {
|
|
392
|
+
return snapshotOf('slope', { period: this.period, buf: [...this.buf], value: this.value });
|
|
393
|
+
}
|
|
394
|
+
static fromJSON(snapshot) {
|
|
395
|
+
const state = readSnapshot(snapshot, 'slope');
|
|
396
|
+
const x = new SlopeStream(state.lookback('period'));
|
|
397
|
+
x.buf = state.numbers('buf');
|
|
398
|
+
x.value = state.cached('value');
|
|
399
|
+
return x;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
export const slope = withBuiltinMetadata(makeIndicator((p) => new SlopeStream(requirePeriod(p.period ?? 1, 'slope')), SlopeStream.fromJSON, nan), builtinMetadata.slopeMetadata);
|
|
403
|
+
class PvoStream {
|
|
404
|
+
fast;
|
|
405
|
+
slow;
|
|
406
|
+
signalEma;
|
|
407
|
+
value = null;
|
|
408
|
+
constructor(parameters) {
|
|
409
|
+
requireStreamParameters('PvoStream.constructor#0', 'PvoStream', parameters);
|
|
410
|
+
const { fast, slow, signal } = parameters;
|
|
411
|
+
this.fast = new EmaStream(fast);
|
|
412
|
+
this.slow = new EmaStream(slow);
|
|
413
|
+
this.signalEma = new EmaStream(signal);
|
|
414
|
+
}
|
|
415
|
+
next(bar) {
|
|
416
|
+
const volume = bar.volume ?? 0;
|
|
417
|
+
const f = this.fast.next(volume);
|
|
418
|
+
const s = this.slow.next(volume);
|
|
419
|
+
if (f === null || s === null || s === 0) {
|
|
420
|
+
this.value = null;
|
|
421
|
+
return null;
|
|
422
|
+
}
|
|
423
|
+
const pvo = ((f - s) / s) * 100;
|
|
424
|
+
const sig = this.signalEma.next(pvo);
|
|
425
|
+
if (sig === null) {
|
|
426
|
+
this.value = null;
|
|
427
|
+
return null;
|
|
428
|
+
}
|
|
429
|
+
this.value = { pvo, signal: sig, histogram: pvo - sig };
|
|
430
|
+
return this.value;
|
|
431
|
+
}
|
|
432
|
+
toJSON() {
|
|
433
|
+
return snapshotOf('pvo', {
|
|
434
|
+
fast: this.fast.toJSON(),
|
|
435
|
+
slow: this.slow.toJSON(),
|
|
436
|
+
signal: this.signalEma.toJSON(),
|
|
437
|
+
value: this.value,
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
static fromJSON(snapshot) {
|
|
441
|
+
const state = readSnapshot(snapshot, 'pvo');
|
|
442
|
+
const x = new PvoStream({ fast: 1, slow: 1, signal: 1 });
|
|
443
|
+
x.fast = EmaStream.fromJSON(state.child('fast'));
|
|
444
|
+
x.slow = EmaStream.fromJSON(state.child('slow'));
|
|
445
|
+
x.signalEma = EmaStream.fromJSON(state.child('signal'));
|
|
446
|
+
x.value = state.cached('value');
|
|
447
|
+
return x;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
export const pvo = withBuiltinMetadata(makeIndicator((p) => new PvoStream({
|
|
451
|
+
fast: requirePeriod(p.fast ?? 12, 'pvo', 'fast'),
|
|
452
|
+
slow: requirePeriod(p.slow ?? 26, 'pvo', 'slow'),
|
|
453
|
+
signal: requirePeriod(p.signal ?? 9, 'pvo', 'signal'),
|
|
454
|
+
}), PvoStream.fromJSON, () => ({ pvo: NaN, signal: NaN, histogram: NaN })), builtinMetadata.pvoMetadata);
|
|
455
|
+
class ElderRayStream {
|
|
456
|
+
ema;
|
|
457
|
+
value = null;
|
|
458
|
+
constructor(period) {
|
|
459
|
+
requirePeriod(period, 'ElderRayStream');
|
|
460
|
+
this.ema = new EmaStream(period);
|
|
461
|
+
}
|
|
462
|
+
next(bar) {
|
|
463
|
+
const e = this.ema.next(bar.close);
|
|
464
|
+
if (e === null) {
|
|
465
|
+
this.value = null;
|
|
466
|
+
return null;
|
|
467
|
+
}
|
|
468
|
+
this.value = { bull: bar.high - e, bear: bar.low - e };
|
|
469
|
+
return this.value;
|
|
470
|
+
}
|
|
471
|
+
toJSON() {
|
|
472
|
+
return snapshotOf('elderRay', { ema: this.ema.toJSON(), value: this.value });
|
|
473
|
+
}
|
|
474
|
+
static fromJSON(snapshot) {
|
|
475
|
+
const state = readSnapshot(snapshot, 'elderRay');
|
|
476
|
+
const x = new ElderRayStream(1);
|
|
477
|
+
x.ema = EmaStream.fromJSON(state.child('ema'));
|
|
478
|
+
x.value = state.cached('value');
|
|
479
|
+
return x;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
export const elderRay = withBuiltinMetadata(makeIndicator((p) => new ElderRayStream(requirePeriod(p.period ?? 13, 'elderRay')), ElderRayStream.fromJSON, () => ({ bull: NaN, bear: NaN })), builtinMetadata.elderRayMetadata);
|
|
483
|
+
class BrarStream {
|
|
484
|
+
period;
|
|
485
|
+
previousClose = null;
|
|
486
|
+
hoSum = 0; // Σ(high − open)
|
|
487
|
+
olSum = 0; // Σ(open − low)
|
|
488
|
+
hcSum = 0; // Σ(high − previousClose)
|
|
489
|
+
clSum = 0; // Σ(previousClose − low)
|
|
490
|
+
ho = [];
|
|
491
|
+
ol = [];
|
|
492
|
+
hc = [];
|
|
493
|
+
cl = [];
|
|
494
|
+
/** Non-finite rows inside each window — the interior-NaN gate (see `./nan-policy`). */
|
|
495
|
+
nanHoOl = 0;
|
|
496
|
+
nanHcCl = 0;
|
|
497
|
+
value = null;
|
|
498
|
+
constructor(period) {
|
|
499
|
+
this.period = period;
|
|
500
|
+
requirePeriod(period, 'BrarStream', 'period', 1, 'bars');
|
|
501
|
+
}
|
|
502
|
+
next(bar) {
|
|
503
|
+
const open = bar.open ?? bar.close;
|
|
504
|
+
const ho = bar.high - open;
|
|
505
|
+
const ol = open - bar.low;
|
|
506
|
+
this.ho.push(ho);
|
|
507
|
+
this.ol.push(ol);
|
|
508
|
+
// Interior-NaN policy: only finite rows enter the running sums.
|
|
509
|
+
if (isDirtySample(ho) || isDirtySample(ol))
|
|
510
|
+
this.nanHoOl++;
|
|
511
|
+
else {
|
|
512
|
+
this.hoSum += ho;
|
|
513
|
+
this.olSum += ol;
|
|
514
|
+
}
|
|
515
|
+
if (this.previousClose !== null) {
|
|
516
|
+
// `Math.max(0, NaN)` is NaN, so a bad prior close stays visible rather than clamping to 0.
|
|
517
|
+
const hc = Math.max(0, bar.high - this.previousClose);
|
|
518
|
+
const cl = Math.max(0, this.previousClose - bar.low);
|
|
519
|
+
this.hc.push(hc);
|
|
520
|
+
this.cl.push(cl);
|
|
521
|
+
if (isDirtySample(hc) || isDirtySample(cl))
|
|
522
|
+
this.nanHcCl++;
|
|
523
|
+
else {
|
|
524
|
+
this.hcSum += hc;
|
|
525
|
+
this.clSum += cl;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
this.previousClose = bar.close;
|
|
529
|
+
if (this.ho.length > this.period) {
|
|
530
|
+
const goneHo = this.ho.shift();
|
|
531
|
+
const goneOl = this.ol.shift();
|
|
532
|
+
if (isDirtySample(goneHo) || isDirtySample(goneOl))
|
|
533
|
+
this.nanHoOl--;
|
|
534
|
+
else {
|
|
535
|
+
this.hoSum -= goneHo;
|
|
536
|
+
this.olSum -= goneOl;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
if (this.hc.length > this.period) {
|
|
540
|
+
const goneHc = this.hc.shift();
|
|
541
|
+
const goneCl = this.cl.shift();
|
|
542
|
+
if (isDirtySample(goneHc) || isDirtySample(goneCl))
|
|
543
|
+
this.nanHcCl--;
|
|
544
|
+
else {
|
|
545
|
+
this.hcSum -= goneHc;
|
|
546
|
+
this.clSum -= goneCl;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
if (this.ho.length < this.period || this.hc.length < this.period) {
|
|
550
|
+
this.value = null;
|
|
551
|
+
return null;
|
|
552
|
+
}
|
|
553
|
+
if (this.nanHoOl > 0 || this.nanHcCl > 0) {
|
|
554
|
+
this.value = { popularityIndex: NaN, willingnessIndex: NaN };
|
|
555
|
+
return this.value;
|
|
556
|
+
}
|
|
557
|
+
this.value = {
|
|
558
|
+
popularityIndex: this.olSum === 0 ? 0 : (100 * this.hoSum) / this.olSum,
|
|
559
|
+
willingnessIndex: this.clSum === 0 ? 0 : (100 * this.hcSum) / this.clSum,
|
|
560
|
+
};
|
|
561
|
+
return this.value;
|
|
562
|
+
}
|
|
563
|
+
toJSON() {
|
|
564
|
+
return snapshotOf('brar', {
|
|
565
|
+
period: this.period,
|
|
566
|
+
previousClose: this.previousClose,
|
|
567
|
+
hoSum: this.hoSum,
|
|
568
|
+
olSum: this.olSum,
|
|
569
|
+
hcSum: this.hcSum,
|
|
570
|
+
clSum: this.clSum,
|
|
571
|
+
ho: [...this.ho],
|
|
572
|
+
ol: [...this.ol],
|
|
573
|
+
hc: [...this.hc],
|
|
574
|
+
cl: [...this.cl],
|
|
575
|
+
value: this.value,
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
static fromJSON(snapshot) {
|
|
579
|
+
const state = readSnapshot(snapshot, 'brar');
|
|
580
|
+
const x = new BrarStream(state.lookback('period'));
|
|
581
|
+
Object.assign(x, {
|
|
582
|
+
previousClose: state.numberOrNull('previousClose'),
|
|
583
|
+
hoSum: state.number('hoSum'),
|
|
584
|
+
olSum: state.number('olSum'),
|
|
585
|
+
hcSum: state.number('hcSum'),
|
|
586
|
+
clSum: state.number('clSum'),
|
|
587
|
+
});
|
|
588
|
+
x.ho = state.numbers('ho');
|
|
589
|
+
x.ol = state.numbers('ol');
|
|
590
|
+
x.hc = state.numbers('hc');
|
|
591
|
+
x.cl = state.numbers('cl');
|
|
592
|
+
x.nanHoOl = dirtyRows(x.ho, x.ol);
|
|
593
|
+
x.nanHcCl = dirtyRows(x.hc, x.cl);
|
|
594
|
+
x.value = state.cached('value');
|
|
595
|
+
return x;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
export const brar = withBuiltinMetadata(makeIndicator((p) => new BrarStream(requirePeriod(p.period ?? 26, 'brar')), BrarStream.fromJSON, () => ({ popularityIndex: NaN, willingnessIndex: NaN })), builtinMetadata.brarMetadata);
|
|
599
|
+
class KdjStream {
|
|
600
|
+
highs = [];
|
|
601
|
+
lows = [];
|
|
602
|
+
k = null;
|
|
603
|
+
d = null;
|
|
604
|
+
alpha;
|
|
605
|
+
value = null;
|
|
606
|
+
period;
|
|
607
|
+
constructor(parameters) {
|
|
608
|
+
requireStreamParameters('KdjStream.constructor#0', 'KdjStream', parameters);
|
|
609
|
+
const { period, signal } = parameters;
|
|
610
|
+
this.period = period;
|
|
611
|
+
this.alpha = 1 / signal;
|
|
612
|
+
}
|
|
613
|
+
next(bar) {
|
|
614
|
+
this.highs.push(bar.high);
|
|
615
|
+
this.lows.push(bar.low);
|
|
616
|
+
if (this.highs.length > this.period) {
|
|
617
|
+
this.highs.shift();
|
|
618
|
+
this.lows.shift();
|
|
619
|
+
}
|
|
620
|
+
if (this.highs.length < this.period) {
|
|
621
|
+
this.value = null;
|
|
622
|
+
return null;
|
|
623
|
+
}
|
|
624
|
+
let hh = this.highs[0];
|
|
625
|
+
let ll = this.lows[0];
|
|
626
|
+
for (let i = 1; i < this.period; i++) {
|
|
627
|
+
if (this.highs[i] > hh)
|
|
628
|
+
hh = this.highs[i];
|
|
629
|
+
if (this.lows[i] < ll)
|
|
630
|
+
ll = this.lows[i];
|
|
631
|
+
}
|
|
632
|
+
const rsv = hh === ll ? 50 : (100 * (bar.close - ll)) / (hh - ll);
|
|
633
|
+
this.k = this.k === null ? rsv : this.k + this.alpha * (rsv - this.k);
|
|
634
|
+
this.d = this.d === null ? this.k : this.d + this.alpha * (this.k - this.d);
|
|
635
|
+
this.value = { k: this.k, d: this.d, j: 3 * this.k - 2 * this.d };
|
|
636
|
+
return this.value;
|
|
637
|
+
}
|
|
638
|
+
toJSON() {
|
|
639
|
+
return snapshotOf('kdj', {
|
|
640
|
+
period: this.period,
|
|
641
|
+
alpha: this.alpha,
|
|
642
|
+
highs: [...this.highs],
|
|
643
|
+
lows: [...this.lows],
|
|
644
|
+
k: this.k,
|
|
645
|
+
d: this.d,
|
|
646
|
+
value: this.value,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
static fromJSON(snapshot) {
|
|
650
|
+
const state = readSnapshot(snapshot, 'kdj');
|
|
651
|
+
const x = new KdjStream({ period: state.lookback('period'), signal: 1 });
|
|
652
|
+
Object.assign(x, {
|
|
653
|
+
alpha: state.number('alpha'),
|
|
654
|
+
k: state.numberOrNull('k'),
|
|
655
|
+
d: state.numberOrNull('d'),
|
|
656
|
+
});
|
|
657
|
+
x.highs = state.numbers('highs');
|
|
658
|
+
x.lows = state.numbers('lows');
|
|
659
|
+
x.value = state.cached('value');
|
|
660
|
+
return x;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
export const kdj = withBuiltinMetadata(makeIndicator((p) => new KdjStream({
|
|
664
|
+
period: requirePeriod(p.period ?? 9, 'kdj'),
|
|
665
|
+
signal: requirePeriod(p.signal ?? 3, 'kdj', 'signal'),
|
|
666
|
+
}), KdjStream.fromJSON, () => ({ k: NaN, d: NaN, j: NaN })), builtinMetadata.kdjMetadata);
|
|
667
|
+
class RvgiStream {
|
|
668
|
+
co = []; // close − open, last 4
|
|
669
|
+
hl = []; // high − low, last 4
|
|
670
|
+
numSma;
|
|
671
|
+
denSma;
|
|
672
|
+
rvis = []; // last 4 RVI values for the signal swma
|
|
673
|
+
value = null;
|
|
674
|
+
constructor(period) {
|
|
675
|
+
requirePeriod(period, 'RvgiStream');
|
|
676
|
+
this.numSma = new SmaStream(period);
|
|
677
|
+
this.denSma = new SmaStream(period);
|
|
678
|
+
}
|
|
679
|
+
static swma4(a) {
|
|
680
|
+
// most-recent-last; weights 1,2,2,1 over the last four
|
|
681
|
+
const n = a.length;
|
|
682
|
+
return (a[n - 1] + 2 * a[n - 2] + 2 * a[n - 3] + a[n - 4]) / 6;
|
|
683
|
+
}
|
|
684
|
+
next(bar) {
|
|
685
|
+
const open = bar.open ?? bar.close;
|
|
686
|
+
this.co.push(bar.close - open);
|
|
687
|
+
this.hl.push(bar.high - bar.low);
|
|
688
|
+
if (this.co.length > 4) {
|
|
689
|
+
this.co.shift();
|
|
690
|
+
this.hl.shift();
|
|
691
|
+
}
|
|
692
|
+
if (this.co.length < 4) {
|
|
693
|
+
this.value = null;
|
|
694
|
+
return null;
|
|
695
|
+
}
|
|
696
|
+
const num = RvgiStream.swma4(this.co);
|
|
697
|
+
const den = RvgiStream.swma4(this.hl);
|
|
698
|
+
const numS = this.numSma.next(num);
|
|
699
|
+
const denS = this.denSma.next(den);
|
|
700
|
+
if (numS === null || denS === null) {
|
|
701
|
+
this.value = null;
|
|
702
|
+
return null;
|
|
703
|
+
}
|
|
704
|
+
const rvi = denS === 0 ? 0 : numS / denS;
|
|
705
|
+
this.rvis.push(rvi);
|
|
706
|
+
if (this.rvis.length > 4)
|
|
707
|
+
this.rvis.shift();
|
|
708
|
+
if (this.rvis.length < 4) {
|
|
709
|
+
this.value = null;
|
|
710
|
+
return null;
|
|
711
|
+
}
|
|
712
|
+
this.value = { rvi, signal: RvgiStream.swma4(this.rvis) };
|
|
713
|
+
return this.value;
|
|
714
|
+
}
|
|
715
|
+
toJSON() {
|
|
716
|
+
return snapshotOf('rvgi', {
|
|
717
|
+
co: [...this.co],
|
|
718
|
+
hl: [...this.hl],
|
|
719
|
+
numSma: this.numSma.toJSON(),
|
|
720
|
+
denSma: this.denSma.toJSON(),
|
|
721
|
+
rvis: [...this.rvis],
|
|
722
|
+
value: this.value,
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
static fromJSON(snapshot) {
|
|
726
|
+
const state = readSnapshot(snapshot, 'rvgi');
|
|
727
|
+
const x = new RvgiStream(1);
|
|
728
|
+
x.numSma = SmaStream.fromJSON(state.child('numSma'));
|
|
729
|
+
x.denSma = SmaStream.fromJSON(state.child('denSma'));
|
|
730
|
+
x.co = state.numbers('co');
|
|
731
|
+
x.hl = state.numbers('hl');
|
|
732
|
+
x.rvis = state.numbers('rvis');
|
|
733
|
+
x.value = state.cached('value');
|
|
734
|
+
return x;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
export const relativeVigorIndex = withBuiltinMetadata(makeIndicator((p) => new RvgiStream(requirePeriod(p.period ?? 14, 'relativeVigorIndex')), RvgiStream.fromJSON, () => ({ rvi: NaN, signal: NaN })), builtinMetadata.relativeVigorIndexMetadata);
|
|
738
|
+
// ───────────────────────── PGO (Pretty Good Oscillator) ─────────────────────────
|
|
739
|
+
class PgoStream {
|
|
740
|
+
previousClose = null;
|
|
741
|
+
sma;
|
|
742
|
+
trEma;
|
|
743
|
+
value = null;
|
|
744
|
+
constructor(period) {
|
|
745
|
+
requirePeriod(period, 'PgoStream', 'period', 1, 'bars');
|
|
746
|
+
this.sma = new SmaStream(period);
|
|
747
|
+
this.trEma = new EmaStream(period);
|
|
748
|
+
}
|
|
749
|
+
next(bar) {
|
|
750
|
+
const tr = this.previousClose === null
|
|
751
|
+
? bar.high - bar.low
|
|
752
|
+
: Math.max(bar.high - bar.low, Math.abs(bar.high - this.previousClose), Math.abs(bar.low - this.previousClose));
|
|
753
|
+
this.previousClose = bar.close;
|
|
754
|
+
const m = this.sma.next(bar.close);
|
|
755
|
+
const atr = this.trEma.next(tr);
|
|
756
|
+
if (m === null || atr === null) {
|
|
757
|
+
this.value = null;
|
|
758
|
+
return null;
|
|
759
|
+
}
|
|
760
|
+
this.value = atr === 0 ? 0 : (bar.close - m) / atr;
|
|
761
|
+
return this.value;
|
|
762
|
+
}
|
|
763
|
+
toJSON() {
|
|
764
|
+
return snapshotOf('pgo', {
|
|
765
|
+
previousClose: this.previousClose,
|
|
766
|
+
sma: this.sma.toJSON(),
|
|
767
|
+
trEma: this.trEma.toJSON(),
|
|
768
|
+
value: this.value,
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
static fromJSON(snapshot) {
|
|
772
|
+
const state = readSnapshot(snapshot, 'pgo');
|
|
773
|
+
const x = new PgoStream(1);
|
|
774
|
+
Object.assign(x, { previousClose: state.numberOrNull('previousClose') });
|
|
775
|
+
x.sma = SmaStream.fromJSON(state.child('sma'));
|
|
776
|
+
x.trEma = EmaStream.fromJSON(state.child('trEma'));
|
|
777
|
+
x.value = state.cached('value');
|
|
778
|
+
return x;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
export const pgo = withBuiltinMetadata(makeIndicator((p) => new PgoStream(requirePeriod(p.period ?? 14, 'pgo')), PgoStream.fromJSON, nan), builtinMetadata.pgoMetadata);
|
|
782
|
+
class TrixHistogramStream {
|
|
783
|
+
trix;
|
|
784
|
+
signalEma;
|
|
785
|
+
value = null;
|
|
786
|
+
constructor(parameters) {
|
|
787
|
+
requireStreamParameters('TrixHistogramStream.constructor#0', 'TrixHistogramStream', parameters);
|
|
788
|
+
const { period, signal } = parameters;
|
|
789
|
+
this.trix = new TrixStream(period);
|
|
790
|
+
this.signalEma = new EmaStream(signal);
|
|
791
|
+
}
|
|
792
|
+
next(value) {
|
|
793
|
+
const t = this.trix.next(value);
|
|
794
|
+
if (t === null) {
|
|
795
|
+
this.value = null;
|
|
796
|
+
return null;
|
|
797
|
+
}
|
|
798
|
+
const sig = this.signalEma.next(t);
|
|
799
|
+
if (sig === null) {
|
|
800
|
+
this.value = null;
|
|
801
|
+
return null;
|
|
802
|
+
}
|
|
803
|
+
this.value = { trix: t, signal: sig, histogram: t - sig };
|
|
804
|
+
return this.value;
|
|
805
|
+
}
|
|
806
|
+
toJSON() {
|
|
807
|
+
return snapshotOf('trixHistogram', {
|
|
808
|
+
trix: this.trix.toJSON(),
|
|
809
|
+
signal: this.signalEma.toJSON(),
|
|
810
|
+
value: this.value,
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
static fromJSON(snapshot) {
|
|
814
|
+
const state = readSnapshot(snapshot, 'trixHistogram');
|
|
815
|
+
const x = new TrixHistogramStream({ period: 1, signal: 1 });
|
|
816
|
+
x.trix = TrixStream.fromJSON(state.child('trix'));
|
|
817
|
+
x.signalEma = EmaStream.fromJSON(state.child('signal'));
|
|
818
|
+
x.value = state.cached('value');
|
|
819
|
+
return x;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
export const trixHistogram = withBuiltinMetadata(makeIndicator((p) => new TrixHistogramStream({
|
|
823
|
+
period: requirePeriod(p.period ?? 15, 'trixHistogram'),
|
|
824
|
+
signal: requirePeriod(p.signal ?? 9, 'trixHistogram', 'signal'),
|
|
825
|
+
}), TrixHistogramStream.fromJSON, () => ({ trix: NaN, signal: NaN, histogram: NaN })), builtinMetadata.trixHistogramMetadata);
|
|
826
|
+
class SmiErgodicStream {
|
|
827
|
+
tsi;
|
|
828
|
+
value = null;
|
|
829
|
+
constructor(parameters) {
|
|
830
|
+
requireStreamParameters('SmiErgodicStream.constructor#0', 'SmiErgodicStream', parameters);
|
|
831
|
+
const { long, short, signal } = parameters;
|
|
832
|
+
this.tsi = new TsiStream({ long, short, signal });
|
|
833
|
+
}
|
|
834
|
+
next(value) {
|
|
835
|
+
const t = this.tsi.next(value);
|
|
836
|
+
if (t === null) {
|
|
837
|
+
this.value = null;
|
|
838
|
+
return null;
|
|
839
|
+
}
|
|
840
|
+
this.value = { smi: t.tsi, signal: t.signal, oscillator: t.tsi - t.signal };
|
|
841
|
+
return this.value;
|
|
842
|
+
}
|
|
843
|
+
toJSON() {
|
|
844
|
+
return snapshotOf('smiErgodic', { tsi: this.tsi.toJSON(), value: this.value });
|
|
845
|
+
}
|
|
846
|
+
static fromJSON(snapshot) {
|
|
847
|
+
const state = readSnapshot(snapshot, 'smiErgodic');
|
|
848
|
+
const x = new SmiErgodicStream({ long: 1, short: 1, signal: 1 });
|
|
849
|
+
x.tsi = TsiStream.fromJSON(state.child('tsi'));
|
|
850
|
+
x.value = state.cached('value');
|
|
851
|
+
return x;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
export const smiErgodic = withBuiltinMetadata(makeIndicator((p) => new SmiErgodicStream({
|
|
855
|
+
long: requirePeriod(p.long ?? 20, 'smiErgodic', 'long'),
|
|
856
|
+
short: requirePeriod(p.short ?? 5, 'smiErgodic', 'short'),
|
|
857
|
+
signal: requirePeriod(p.signal ?? 5, 'smiErgodic', 'signal'),
|
|
858
|
+
}), SmiErgodicStream.fromJSON, () => ({ smi: NaN, signal: NaN, oscillator: NaN })), builtinMetadata.smiErgodicMetadata);
|
|
859
|
+
class VolumeWeightedMacdStream {
|
|
860
|
+
fast;
|
|
861
|
+
slow;
|
|
862
|
+
signalEma;
|
|
863
|
+
value = null;
|
|
864
|
+
constructor(parameters) {
|
|
865
|
+
requireStreamParameters('VolumeWeightedMacdStream.constructor#0', 'VolumeWeightedMacdStream', parameters);
|
|
866
|
+
const { fast, slow, signal } = parameters;
|
|
867
|
+
this.fast = new VwmaStream(fast);
|
|
868
|
+
this.slow = new VwmaStream(slow);
|
|
869
|
+
this.signalEma = new EmaStream(signal);
|
|
870
|
+
}
|
|
871
|
+
next(bar) {
|
|
872
|
+
const f = this.fast.next(bar);
|
|
873
|
+
const s = this.slow.next(bar);
|
|
874
|
+
if (f === null || s === null) {
|
|
875
|
+
this.value = null;
|
|
876
|
+
return null;
|
|
877
|
+
}
|
|
878
|
+
const macd = f - s;
|
|
879
|
+
const sig = this.signalEma.next(macd);
|
|
880
|
+
if (sig === null) {
|
|
881
|
+
this.value = null;
|
|
882
|
+
return null;
|
|
883
|
+
}
|
|
884
|
+
this.value = { macd, signal: sig, histogram: macd - sig };
|
|
885
|
+
return this.value;
|
|
886
|
+
}
|
|
887
|
+
toJSON() {
|
|
888
|
+
return snapshotOf('volumeWeightedMacd', {
|
|
889
|
+
fast: this.fast.toJSON(),
|
|
890
|
+
slow: this.slow.toJSON(),
|
|
891
|
+
signal: this.signalEma.toJSON(),
|
|
892
|
+
value: this.value,
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
static fromJSON(snapshot) {
|
|
896
|
+
const state = readSnapshot(snapshot, 'volumeWeightedMacd');
|
|
897
|
+
const x = new VolumeWeightedMacdStream({ fast: 1, slow: 1, signal: 1 });
|
|
898
|
+
x.fast = VwmaStream.fromJSON(state.child('fast'));
|
|
899
|
+
x.slow = VwmaStream.fromJSON(state.child('slow'));
|
|
900
|
+
x.signalEma = EmaStream.fromJSON(state.child('signal'));
|
|
901
|
+
x.value = state.cached('value');
|
|
902
|
+
return x;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
export const volumeWeightedMacd = withBuiltinMetadata(makeIndicator((p) => new VolumeWeightedMacdStream({
|
|
906
|
+
fast: requirePeriod(p.fast ?? 12, 'volumeWeightedMacd', 'fast'),
|
|
907
|
+
slow: requirePeriod(p.slow ?? 26, 'volumeWeightedMacd', 'slow'),
|
|
908
|
+
signal: requirePeriod(p.signal ?? 9, 'volumeWeightedMacd', 'signal'),
|
|
909
|
+
}), VolumeWeightedMacdStream.fromJSON, () => ({ macd: NaN, signal: NaN, histogram: NaN })), builtinMetadata.volumeWeightedMacdMetadata);
|
|
910
|
+
class InertiaStream {
|
|
911
|
+
rvi;
|
|
912
|
+
lin;
|
|
913
|
+
value = null;
|
|
914
|
+
constructor(parameters) {
|
|
915
|
+
requireStreamParameters('InertiaStream.constructor#0', 'InertiaStream', parameters);
|
|
916
|
+
const { period, rviPeriod } = parameters;
|
|
917
|
+
this.rvi = new RviStream({ stdevPeriod: rviPeriod, smoothPeriod: rviPeriod });
|
|
918
|
+
this.lin = new LinregStream(period);
|
|
919
|
+
}
|
|
920
|
+
next(value) {
|
|
921
|
+
const r = this.rvi.next(value);
|
|
922
|
+
if (r === null) {
|
|
923
|
+
this.value = null;
|
|
924
|
+
return null;
|
|
925
|
+
}
|
|
926
|
+
const l = this.lin.next(r);
|
|
927
|
+
this.value = l === null ? null : l.value;
|
|
928
|
+
return this.value;
|
|
929
|
+
}
|
|
930
|
+
toJSON() {
|
|
931
|
+
return snapshotOf('inertia', {
|
|
932
|
+
rvi: this.rvi.toJSON(),
|
|
933
|
+
lin: this.lin.toJSON(),
|
|
934
|
+
value: this.value,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
static fromJSON(snapshot) {
|
|
938
|
+
const state = readSnapshot(snapshot, 'inertia');
|
|
939
|
+
const x = new InertiaStream({ period: 1, rviPeriod: 2 });
|
|
940
|
+
x.rvi = RviStream.fromJSON(state.child('rvi'));
|
|
941
|
+
x.lin = LinregStream.fromJSON(state.child('lin'));
|
|
942
|
+
x.value = state.cached('value');
|
|
943
|
+
return x;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
export const inertia = withBuiltinMetadata(makeIndicator((p) => new InertiaStream({
|
|
947
|
+
period: requirePeriod(p.period ?? 20, 'inertia'),
|
|
948
|
+
rviPeriod: requirePeriod(p.rviPeriod ?? 14, 'inertia', 'rviPeriod', 2),
|
|
949
|
+
}), InertiaStream.fromJSON, nan), builtinMetadata.inertiaMetadata);
|
|
950
|
+
class LaguerreRsiStream {
|
|
951
|
+
gamma;
|
|
952
|
+
l0 = null;
|
|
953
|
+
l1 = 0;
|
|
954
|
+
l2 = 0;
|
|
955
|
+
l3 = 0;
|
|
956
|
+
value = null;
|
|
957
|
+
constructor(gamma) {
|
|
958
|
+
this.gamma = gamma;
|
|
959
|
+
}
|
|
960
|
+
next(price) {
|
|
961
|
+
const g = this.gamma;
|
|
962
|
+
if (this.l0 === null) {
|
|
963
|
+
this.l0 = price;
|
|
964
|
+
this.l1 = price;
|
|
965
|
+
this.l2 = price;
|
|
966
|
+
this.l3 = price;
|
|
967
|
+
this.value = 0;
|
|
968
|
+
return 0;
|
|
969
|
+
}
|
|
970
|
+
const l0 = (1 - g) * price + g * this.l0;
|
|
971
|
+
const l1 = -g * l0 + this.l0 + g * this.l1;
|
|
972
|
+
const l2 = -g * l1 + this.l1 + g * this.l2;
|
|
973
|
+
const l3 = -g * l2 + this.l2 + g * this.l3;
|
|
974
|
+
let cu = 0;
|
|
975
|
+
let cd = 0;
|
|
976
|
+
if (l0 >= l1)
|
|
977
|
+
cu += l0 - l1;
|
|
978
|
+
else
|
|
979
|
+
cd += l1 - l0;
|
|
980
|
+
if (l1 >= l2)
|
|
981
|
+
cu += l1 - l2;
|
|
982
|
+
else
|
|
983
|
+
cd += l2 - l1;
|
|
984
|
+
if (l2 >= l3)
|
|
985
|
+
cu += l2 - l3;
|
|
986
|
+
else
|
|
987
|
+
cd += l3 - l2;
|
|
988
|
+
this.l0 = l0;
|
|
989
|
+
this.l1 = l1;
|
|
990
|
+
this.l2 = l2;
|
|
991
|
+
this.l3 = l3;
|
|
992
|
+
this.value = cu + cd === 0 ? 0 : cu / (cu + cd);
|
|
993
|
+
return this.value;
|
|
994
|
+
}
|
|
995
|
+
toJSON() {
|
|
996
|
+
return snapshotOf('laguerreRsi', {
|
|
997
|
+
gamma: this.gamma,
|
|
998
|
+
l0: this.l0,
|
|
999
|
+
l1: this.l1,
|
|
1000
|
+
l2: this.l2,
|
|
1001
|
+
l3: this.l3,
|
|
1002
|
+
value: this.value,
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
static fromJSON(snapshot) {
|
|
1006
|
+
const state = readSnapshot(snapshot, 'laguerreRsi');
|
|
1007
|
+
const x = new LaguerreRsiStream(state.number('gamma'));
|
|
1008
|
+
Object.assign(x, {
|
|
1009
|
+
l0: state.numberOrNull('l0'),
|
|
1010
|
+
l1: state.number('l1'),
|
|
1011
|
+
l2: state.number('l2'),
|
|
1012
|
+
l3: state.number('l3'),
|
|
1013
|
+
});
|
|
1014
|
+
x.value = state.cached('value');
|
|
1015
|
+
return x;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
export const laguerreRsi = withBuiltinMetadata(makeIndicator((p) => new LaguerreRsiStream(requireInRange(p.gamma ?? 0.5, 'laguerreRsi', 'gamma', 0, 1)), LaguerreRsiStream.fromJSON, nan), builtinMetadata.laguerreRsiMetadata);
|
|
1019
|
+
class QqeStream {
|
|
1020
|
+
rsi;
|
|
1021
|
+
rsiMaEma;
|
|
1022
|
+
atrMa;
|
|
1023
|
+
darEma;
|
|
1024
|
+
prevRsiMa = null;
|
|
1025
|
+
longBand = 0;
|
|
1026
|
+
shortBand = 0;
|
|
1027
|
+
initialized = false;
|
|
1028
|
+
value = null;
|
|
1029
|
+
factor;
|
|
1030
|
+
constructor(parameters) {
|
|
1031
|
+
requireStreamParameters('QqeStream.constructor#0', 'QqeStream', parameters);
|
|
1032
|
+
const { rsiPeriod, smooth, factor } = parameters;
|
|
1033
|
+
this.factor = factor;
|
|
1034
|
+
const wilders = 2 * rsiPeriod - 1;
|
|
1035
|
+
this.rsi = new RsiStream(rsiPeriod);
|
|
1036
|
+
this.rsiMaEma = new EmaStream(smooth);
|
|
1037
|
+
this.atrMa = new EmaStream(wilders);
|
|
1038
|
+
this.darEma = new EmaStream(wilders);
|
|
1039
|
+
}
|
|
1040
|
+
next(value) {
|
|
1041
|
+
const r = this.rsi.next(value);
|
|
1042
|
+
if (r === null) {
|
|
1043
|
+
this.value = null;
|
|
1044
|
+
return null;
|
|
1045
|
+
}
|
|
1046
|
+
const rm = this.rsiMaEma.next(r);
|
|
1047
|
+
if (rm === null) {
|
|
1048
|
+
this.value = null;
|
|
1049
|
+
return null;
|
|
1050
|
+
}
|
|
1051
|
+
if (this.prevRsiMa === null) {
|
|
1052
|
+
this.prevRsiMa = rm;
|
|
1053
|
+
this.value = null;
|
|
1054
|
+
return null;
|
|
1055
|
+
}
|
|
1056
|
+
const atrRsi = Math.abs(rm - this.prevRsiMa);
|
|
1057
|
+
const m1 = this.atrMa.next(atrRsi);
|
|
1058
|
+
if (m1 === null) {
|
|
1059
|
+
this.prevRsiMa = rm;
|
|
1060
|
+
this.value = null;
|
|
1061
|
+
return null;
|
|
1062
|
+
}
|
|
1063
|
+
const d = this.darEma.next(m1);
|
|
1064
|
+
if (d === null) {
|
|
1065
|
+
this.prevRsiMa = rm;
|
|
1066
|
+
this.value = null;
|
|
1067
|
+
return null;
|
|
1068
|
+
}
|
|
1069
|
+
const dar = d * this.factor;
|
|
1070
|
+
const newLong = rm - dar;
|
|
1071
|
+
const newShort = rm + dar;
|
|
1072
|
+
if (!this.initialized) {
|
|
1073
|
+
this.longBand = newLong;
|
|
1074
|
+
this.shortBand = newShort;
|
|
1075
|
+
this.initialized = true;
|
|
1076
|
+
}
|
|
1077
|
+
else {
|
|
1078
|
+
const pl = this.longBand;
|
|
1079
|
+
const ps = this.shortBand;
|
|
1080
|
+
this.longBand = this.prevRsiMa > pl && rm > pl ? Math.max(pl, newLong) : newLong;
|
|
1081
|
+
this.shortBand = this.prevRsiMa < ps && rm < ps ? Math.min(ps, newShort) : newShort;
|
|
1082
|
+
}
|
|
1083
|
+
this.prevRsiMa = rm;
|
|
1084
|
+
this.value = { rsiMovingAverage: rm, longBand: this.longBand, shortBand: this.shortBand };
|
|
1085
|
+
return this.value;
|
|
1086
|
+
}
|
|
1087
|
+
toJSON() {
|
|
1088
|
+
return snapshotOf('qqe', {
|
|
1089
|
+
factor: this.factor,
|
|
1090
|
+
rsi: this.rsi.toJSON(),
|
|
1091
|
+
rsiMaEma: this.rsiMaEma.toJSON(),
|
|
1092
|
+
atrMa: this.atrMa.toJSON(),
|
|
1093
|
+
darEma: this.darEma.toJSON(),
|
|
1094
|
+
prevRsiMa: this.prevRsiMa,
|
|
1095
|
+
longBand: this.longBand,
|
|
1096
|
+
shortBand: this.shortBand,
|
|
1097
|
+
initialized: this.initialized,
|
|
1098
|
+
value: this.value,
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
static fromJSON(snapshot) {
|
|
1102
|
+
const state = readSnapshot(snapshot, 'qqe');
|
|
1103
|
+
const x = new QqeStream({ rsiPeriod: 2, smooth: 1, factor: state.number('factor') });
|
|
1104
|
+
x.rsi = RsiStream.fromJSON(state.child('rsi'));
|
|
1105
|
+
x.rsiMaEma = EmaStream.fromJSON(state.child('rsiMaEma'));
|
|
1106
|
+
x.atrMa = EmaStream.fromJSON(state.child('atrMa'));
|
|
1107
|
+
x.darEma = EmaStream.fromJSON(state.child('darEma'));
|
|
1108
|
+
Object.assign(x, {
|
|
1109
|
+
prevRsiMa: state.numberOrNull('prevRsiMa'),
|
|
1110
|
+
longBand: state.number('longBand'),
|
|
1111
|
+
shortBand: state.number('shortBand'),
|
|
1112
|
+
initialized: state.boolean('initialized'),
|
|
1113
|
+
});
|
|
1114
|
+
x.value = state.cached('value');
|
|
1115
|
+
return x;
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
export const qqe = withBuiltinMetadata(makeIndicator((p) => new QqeStream({
|
|
1119
|
+
rsiPeriod: requirePeriod(p.rsiPeriod ?? 14, 'qqe', 'rsiPeriod'),
|
|
1120
|
+
smooth: requirePeriod(p.smooth ?? 5, 'qqe', 'smooth'),
|
|
1121
|
+
factor: requirePositive(p.factor ?? 4.236, 'qqe', 'factor'),
|
|
1122
|
+
}), QqeStream.fromJSON, () => ({ rsiMovingAverage: NaN, longBand: NaN, shortBand: NaN })), builtinMetadata.qqeMetadata);
|
|
1123
|
+
// ───────────────────────── RSX (Jurik) ─────────────────────────
|
|
1124
|
+
/**
|
|
1125
|
+
* Jurik RSX — the cascaded double-smoother momentum/|momentum| ratio mapped to [0, 100]. Uses the
|
|
1126
|
+
* canonical Jurik filter cascade; the reference's f88/f90 warmup counter is replaced by the framework
|
|
1127
|
+
* warmup (emits once `period` bars have been seen).
|
|
1128
|
+
*/
|
|
1129
|
+
class RsxStream {
|
|
1130
|
+
period;
|
|
1131
|
+
count = 0;
|
|
1132
|
+
f10 = null;
|
|
1133
|
+
f18;
|
|
1134
|
+
f20;
|
|
1135
|
+
f28 = 0;
|
|
1136
|
+
f30 = 0;
|
|
1137
|
+
f38 = 0;
|
|
1138
|
+
f40 = 0;
|
|
1139
|
+
f48 = 0;
|
|
1140
|
+
f50 = 0;
|
|
1141
|
+
f58 = 0;
|
|
1142
|
+
f60 = 0;
|
|
1143
|
+
f68 = 0;
|
|
1144
|
+
f70 = 0;
|
|
1145
|
+
f78 = 0;
|
|
1146
|
+
f80 = 0;
|
|
1147
|
+
value = null;
|
|
1148
|
+
constructor(period) {
|
|
1149
|
+
this.period = period;
|
|
1150
|
+
requirePeriod(period, 'RsxStream');
|
|
1151
|
+
this.f18 = 3 / (period + 2);
|
|
1152
|
+
this.f20 = 1 - this.f18;
|
|
1153
|
+
}
|
|
1154
|
+
next(price) {
|
|
1155
|
+
this.count++;
|
|
1156
|
+
const f8 = 100 * price;
|
|
1157
|
+
if (this.f10 === null) {
|
|
1158
|
+
this.f10 = f8;
|
|
1159
|
+
this.value = null;
|
|
1160
|
+
return null;
|
|
1161
|
+
}
|
|
1162
|
+
const v8 = f8 - this.f10;
|
|
1163
|
+
this.f10 = f8;
|
|
1164
|
+
const { f18, f20 } = this;
|
|
1165
|
+
this.f28 = f20 * this.f28 + f18 * v8;
|
|
1166
|
+
this.f30 = f18 * this.f28 + f20 * this.f30;
|
|
1167
|
+
const vC = this.f28 * 1.5 - this.f30 * 0.5;
|
|
1168
|
+
this.f38 = f20 * this.f38 + f18 * vC;
|
|
1169
|
+
this.f40 = f18 * this.f38 + f20 * this.f40;
|
|
1170
|
+
const v10 = this.f38 * 1.5 - this.f40 * 0.5;
|
|
1171
|
+
this.f48 = f20 * this.f48 + f18 * v10;
|
|
1172
|
+
this.f50 = f18 * this.f48 + f20 * this.f50;
|
|
1173
|
+
const v14 = this.f48 * 1.5 - this.f50 * 0.5;
|
|
1174
|
+
this.f58 = f20 * this.f58 + f18 * Math.abs(v8);
|
|
1175
|
+
this.f60 = f18 * this.f58 + f20 * this.f60;
|
|
1176
|
+
const v18 = this.f58 * 1.5 - this.f60 * 0.5;
|
|
1177
|
+
this.f68 = f20 * this.f68 + f18 * v18;
|
|
1178
|
+
this.f70 = f18 * this.f68 + f20 * this.f70;
|
|
1179
|
+
const v1C = this.f68 * 1.5 - this.f70 * 0.5;
|
|
1180
|
+
this.f78 = f20 * this.f78 + f18 * v1C;
|
|
1181
|
+
this.f80 = f18 * this.f78 + f20 * this.f80;
|
|
1182
|
+
const v20 = this.f78 * 1.5 - this.f80 * 0.5;
|
|
1183
|
+
if (this.count <= this.period) {
|
|
1184
|
+
this.value = null;
|
|
1185
|
+
return null;
|
|
1186
|
+
}
|
|
1187
|
+
const raw = v20 === 0 ? 50 : (v14 / v20 + 1) * 50;
|
|
1188
|
+
this.value = Math.max(0, Math.min(100, raw));
|
|
1189
|
+
return this.value;
|
|
1190
|
+
}
|
|
1191
|
+
toJSON() {
|
|
1192
|
+
return snapshotOf('rsx', {
|
|
1193
|
+
period: this.period,
|
|
1194
|
+
count: this.count,
|
|
1195
|
+
f10: this.f10,
|
|
1196
|
+
f28: this.f28,
|
|
1197
|
+
f30: this.f30,
|
|
1198
|
+
f38: this.f38,
|
|
1199
|
+
f40: this.f40,
|
|
1200
|
+
f48: this.f48,
|
|
1201
|
+
f50: this.f50,
|
|
1202
|
+
f58: this.f58,
|
|
1203
|
+
f60: this.f60,
|
|
1204
|
+
f68: this.f68,
|
|
1205
|
+
f70: this.f70,
|
|
1206
|
+
f78: this.f78,
|
|
1207
|
+
f80: this.f80,
|
|
1208
|
+
value: this.value,
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
static fromJSON(snapshot) {
|
|
1212
|
+
const state = readSnapshot(snapshot, 'rsx');
|
|
1213
|
+
const x = new RsxStream(state.lookback('period'));
|
|
1214
|
+
Object.assign(x, {
|
|
1215
|
+
count: state.number('count'),
|
|
1216
|
+
f10: state.numberOrNull('f10'),
|
|
1217
|
+
f28: state.number('f28'),
|
|
1218
|
+
f30: state.number('f30'),
|
|
1219
|
+
f38: state.number('f38'),
|
|
1220
|
+
f40: state.number('f40'),
|
|
1221
|
+
f48: state.number('f48'),
|
|
1222
|
+
f50: state.number('f50'),
|
|
1223
|
+
f58: state.number('f58'),
|
|
1224
|
+
f60: state.number('f60'),
|
|
1225
|
+
f68: state.number('f68'),
|
|
1226
|
+
f70: state.number('f70'),
|
|
1227
|
+
f78: state.number('f78'),
|
|
1228
|
+
f80: state.number('f80'),
|
|
1229
|
+
});
|
|
1230
|
+
x.value = state.cached('value');
|
|
1231
|
+
return x;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
export const rsx = withBuiltinMetadata(makeIndicator((p) => new RsxStream(requirePeriod(p.period ?? 14, 'rsx')), RsxStream.fromJSON, nan), builtinMetadata.rsxMetadata);
|
|
1235
|
+
class SchaffTrendCycleStream {
|
|
1236
|
+
emaFast;
|
|
1237
|
+
emaSlow;
|
|
1238
|
+
macdBuf = [];
|
|
1239
|
+
d1 = null;
|
|
1240
|
+
d1Buf = [];
|
|
1241
|
+
d2 = null;
|
|
1242
|
+
value = null;
|
|
1243
|
+
cycle;
|
|
1244
|
+
constructor(parameters) {
|
|
1245
|
+
requireStreamParameters('SchaffTrendCycleStream.constructor#0', 'SchaffTrendCycleStream', parameters);
|
|
1246
|
+
const { fast, slow, cycle } = parameters;
|
|
1247
|
+
this.cycle = cycle;
|
|
1248
|
+
this.emaFast = new EmaStream(fast);
|
|
1249
|
+
this.emaSlow = new EmaStream(slow);
|
|
1250
|
+
}
|
|
1251
|
+
static stoch(buf, cur, prevSmoothed) {
|
|
1252
|
+
let lo = buf[0];
|
|
1253
|
+
let hi = buf[0];
|
|
1254
|
+
for (const x of buf) {
|
|
1255
|
+
if (x < lo)
|
|
1256
|
+
lo = x;
|
|
1257
|
+
if (x > hi)
|
|
1258
|
+
hi = x;
|
|
1259
|
+
}
|
|
1260
|
+
return hi === lo ? (prevSmoothed ?? 0) : (100 * (cur - lo)) / (hi - lo);
|
|
1261
|
+
}
|
|
1262
|
+
next(value) {
|
|
1263
|
+
const ef = this.emaFast.next(value);
|
|
1264
|
+
const es = this.emaSlow.next(value);
|
|
1265
|
+
if (ef === null || es === null) {
|
|
1266
|
+
this.value = null;
|
|
1267
|
+
return null;
|
|
1268
|
+
}
|
|
1269
|
+
const macd = ef - es;
|
|
1270
|
+
this.macdBuf.push(macd);
|
|
1271
|
+
if (this.macdBuf.length > this.cycle)
|
|
1272
|
+
this.macdBuf.shift();
|
|
1273
|
+
if (this.macdBuf.length < this.cycle) {
|
|
1274
|
+
this.value = null;
|
|
1275
|
+
return null;
|
|
1276
|
+
}
|
|
1277
|
+
const stoch1 = SchaffTrendCycleStream.stoch(this.macdBuf, macd, this.d1);
|
|
1278
|
+
this.d1 = this.d1 === null ? stoch1 : this.d1 + 0.5 * (stoch1 - this.d1);
|
|
1279
|
+
this.d1Buf.push(this.d1);
|
|
1280
|
+
if (this.d1Buf.length > this.cycle)
|
|
1281
|
+
this.d1Buf.shift();
|
|
1282
|
+
if (this.d1Buf.length < this.cycle) {
|
|
1283
|
+
this.value = null;
|
|
1284
|
+
return null;
|
|
1285
|
+
}
|
|
1286
|
+
const stoch2 = SchaffTrendCycleStream.stoch(this.d1Buf, this.d1, this.d2);
|
|
1287
|
+
this.d2 = this.d2 === null ? stoch2 : this.d2 + 0.5 * (stoch2 - this.d2);
|
|
1288
|
+
this.value = Math.max(0, Math.min(100, this.d2));
|
|
1289
|
+
return this.value;
|
|
1290
|
+
}
|
|
1291
|
+
toJSON() {
|
|
1292
|
+
return snapshotOf('schaffTrendCycle', {
|
|
1293
|
+
cycle: this.cycle,
|
|
1294
|
+
emaFast: this.emaFast.toJSON(),
|
|
1295
|
+
emaSlow: this.emaSlow.toJSON(),
|
|
1296
|
+
macdBuf: [...this.macdBuf],
|
|
1297
|
+
d1: this.d1,
|
|
1298
|
+
d1Buf: [...this.d1Buf],
|
|
1299
|
+
d2: this.d2,
|
|
1300
|
+
value: this.value,
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
static fromJSON(snapshot) {
|
|
1304
|
+
const state = readSnapshot(snapshot, 'schaffTrendCycle');
|
|
1305
|
+
const x = new SchaffTrendCycleStream({ fast: 1, slow: 1, cycle: state.number('cycle') });
|
|
1306
|
+
x.emaFast = EmaStream.fromJSON(state.child('emaFast'));
|
|
1307
|
+
x.emaSlow = EmaStream.fromJSON(state.child('emaSlow'));
|
|
1308
|
+
Object.assign(x, { d1: state.numberOrNull('d1'), d2: state.numberOrNull('d2') });
|
|
1309
|
+
x.macdBuf = state.numbers('macdBuf');
|
|
1310
|
+
x.d1Buf = state.numbers('d1Buf');
|
|
1311
|
+
x.value = state.cached('value');
|
|
1312
|
+
return x;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
export const schaffTrendCycle = withBuiltinMetadata(makeIndicator((p) => new SchaffTrendCycleStream({
|
|
1316
|
+
fast: requirePeriod(p.fast ?? 23, 'schaffTrendCycle', 'fast'),
|
|
1317
|
+
slow: requirePeriod(p.slow ?? 50, 'schaffTrendCycle', 'slow'),
|
|
1318
|
+
cycle: requirePeriod(p.cycle ?? 10, 'schaffTrendCycle', 'cycle'),
|
|
1319
|
+
}), SchaffTrendCycleStream.fromJSON, nan), builtinMetadata.schaffTrendCycleMetadata);
|
|
1320
|
+
// ───────────────────────── TTM Squeeze ─────────────────────────
|
|
1321
|
+
function popStdev(buf) {
|
|
1322
|
+
const n = buf.length;
|
|
1323
|
+
let sum = 0;
|
|
1324
|
+
for (const x of buf)
|
|
1325
|
+
sum += x;
|
|
1326
|
+
const mean = sum / n;
|
|
1327
|
+
let acc = 0;
|
|
1328
|
+
for (const x of buf) {
|
|
1329
|
+
const d = x - mean;
|
|
1330
|
+
acc += d * d;
|
|
1331
|
+
}
|
|
1332
|
+
return Math.sqrt(acc / n);
|
|
1333
|
+
}
|
|
1334
|
+
function maxOf(xs) {
|
|
1335
|
+
let m = xs[0];
|
|
1336
|
+
for (let i = 1; i < xs.length; i++)
|
|
1337
|
+
if (xs[i] > m)
|
|
1338
|
+
m = xs[i];
|
|
1339
|
+
return m;
|
|
1340
|
+
}
|
|
1341
|
+
function minOf(xs) {
|
|
1342
|
+
let m = xs[0];
|
|
1343
|
+
for (let i = 1; i < xs.length; i++)
|
|
1344
|
+
if (xs[i] < m)
|
|
1345
|
+
m = xs[i];
|
|
1346
|
+
return m;
|
|
1347
|
+
}
|
|
1348
|
+
/** Shared Bollinger-inside-Keltner squeeze machinery + the LazyBear momentum histogram. */
|
|
1349
|
+
class SqueezeCore {
|
|
1350
|
+
previousClose = null;
|
|
1351
|
+
smaKc;
|
|
1352
|
+
trSma;
|
|
1353
|
+
smaBb;
|
|
1354
|
+
bbBuf = [];
|
|
1355
|
+
highs = [];
|
|
1356
|
+
lows = [];
|
|
1357
|
+
lin;
|
|
1358
|
+
bollingerBandPeriod;
|
|
1359
|
+
bollingerStandardDeviations;
|
|
1360
|
+
keltnerChannelPeriod;
|
|
1361
|
+
constructor(parameters) {
|
|
1362
|
+
requireStreamParameters('SqueezeCore.constructor#0', 'SqueezeCore', parameters);
|
|
1363
|
+
const { bollingerBandPeriod, bollingerStandardDeviations, keltnerChannelPeriod } = parameters;
|
|
1364
|
+
this.bollingerBandPeriod = bollingerBandPeriod;
|
|
1365
|
+
this.bollingerStandardDeviations = bollingerStandardDeviations;
|
|
1366
|
+
this.keltnerChannelPeriod = keltnerChannelPeriod;
|
|
1367
|
+
this.smaKc = new SmaStream(keltnerChannelPeriod);
|
|
1368
|
+
this.trSma = new SmaStream(keltnerChannelPeriod);
|
|
1369
|
+
this.smaBb = new SmaStream(bollingerBandPeriod);
|
|
1370
|
+
this.lin = new LinregStream(keltnerChannelPeriod);
|
|
1371
|
+
}
|
|
1372
|
+
/** Returns null until both bands and the momentum regression are warm. */
|
|
1373
|
+
update(bar) {
|
|
1374
|
+
// Public per-tick entry: a malformed bar used to fold NaN into every band and poison the
|
|
1375
|
+
// window state for all later ticks (first-touch law). Three typeof checks per tick is noise
|
|
1376
|
+
// next to the window arithmetic that follows.
|
|
1377
|
+
requireArgumentObject('SqueezeCore.update', 'bar', bar);
|
|
1378
|
+
requireFiniteFields('SqueezeCore.update', bar, ['high', 'low', 'close'], {
|
|
1379
|
+
exampleCall: 'SqueezeCore.update({ high: 11, low: 9, close: 10.5 })',
|
|
1380
|
+
});
|
|
1381
|
+
const tr = this.previousClose === null
|
|
1382
|
+
? bar.high - bar.low
|
|
1383
|
+
: Math.max(bar.high - bar.low, Math.abs(bar.high - this.previousClose), Math.abs(bar.low - this.previousClose));
|
|
1384
|
+
this.previousClose = bar.close;
|
|
1385
|
+
this.highs.push(bar.high);
|
|
1386
|
+
this.lows.push(bar.low);
|
|
1387
|
+
if (this.highs.length > this.keltnerChannelPeriod) {
|
|
1388
|
+
this.highs.shift();
|
|
1389
|
+
this.lows.shift();
|
|
1390
|
+
}
|
|
1391
|
+
this.bbBuf.push(bar.close);
|
|
1392
|
+
if (this.bbBuf.length > this.bollingerBandPeriod)
|
|
1393
|
+
this.bbBuf.shift();
|
|
1394
|
+
const keltnerChannelMiddle = this.smaKc.next(bar.close);
|
|
1395
|
+
const keltnerChannelRange = this.trSma.next(tr);
|
|
1396
|
+
const bbMid = this.smaBb.next(bar.close);
|
|
1397
|
+
if (keltnerChannelMiddle === null || keltnerChannelRange === null || bbMid === null)
|
|
1398
|
+
return null;
|
|
1399
|
+
if (this.highs.length < this.keltnerChannelPeriod ||
|
|
1400
|
+
this.bbBuf.length < this.bollingerBandPeriod)
|
|
1401
|
+
return null;
|
|
1402
|
+
const hh = maxOf(this.highs);
|
|
1403
|
+
const ll = minOf(this.lows);
|
|
1404
|
+
const mm = ((hh + ll) / 2 + keltnerChannelMiddle) / 2;
|
|
1405
|
+
const lr = this.lin.next(bar.close - mm);
|
|
1406
|
+
if (lr === null)
|
|
1407
|
+
return null;
|
|
1408
|
+
const dev = this.bollingerStandardDeviations * popStdev(this.bbBuf);
|
|
1409
|
+
return {
|
|
1410
|
+
upperBollingerBand: bbMid + dev,
|
|
1411
|
+
lowerBollingerBand: bbMid - dev,
|
|
1412
|
+
keltnerChannelMiddle,
|
|
1413
|
+
keltnerChannelRange,
|
|
1414
|
+
momentum: lr.value,
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
toJSON() {
|
|
1418
|
+
return snapshotOf('squeezeCore', {
|
|
1419
|
+
bollingerBandPeriod: this.bollingerBandPeriod,
|
|
1420
|
+
bollingerStandardDeviations: this.bollingerStandardDeviations,
|
|
1421
|
+
keltnerChannelPeriod: this.keltnerChannelPeriod,
|
|
1422
|
+
previousClose: this.previousClose,
|
|
1423
|
+
smaKc: this.smaKc.toJSON(),
|
|
1424
|
+
trSma: this.trSma.toJSON(),
|
|
1425
|
+
smaBb: this.smaBb.toJSON(),
|
|
1426
|
+
bbBuf: [...this.bbBuf],
|
|
1427
|
+
highs: [...this.highs],
|
|
1428
|
+
lows: [...this.lows],
|
|
1429
|
+
lin: this.lin.toJSON(),
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
static fromJSON(snapshot) {
|
|
1433
|
+
const state = readSnapshot(snapshot, 'squeezeCore');
|
|
1434
|
+
const x = new SqueezeCore({
|
|
1435
|
+
bollingerBandPeriod: state.number('bollingerBandPeriod'),
|
|
1436
|
+
bollingerStandardDeviations: state.number('bollingerStandardDeviations'),
|
|
1437
|
+
keltnerChannelPeriod: state.number('keltnerChannelPeriod'),
|
|
1438
|
+
});
|
|
1439
|
+
Object.assign(x, { previousClose: state.numberOrNull('previousClose') });
|
|
1440
|
+
x.smaKc = SmaStream.fromJSON(state.child('smaKc'));
|
|
1441
|
+
x.trSma = SmaStream.fromJSON(state.child('trSma'));
|
|
1442
|
+
x.smaBb = SmaStream.fromJSON(state.child('smaBb'));
|
|
1443
|
+
x.lin = LinregStream.fromJSON(state.child('lin'));
|
|
1444
|
+
x.bbBuf = state.numbers('bbBuf');
|
|
1445
|
+
x.highs = state.numbers('highs');
|
|
1446
|
+
x.lows = state.numbers('lows');
|
|
1447
|
+
return x;
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
class SqueezeStream {
|
|
1451
|
+
core;
|
|
1452
|
+
value = null;
|
|
1453
|
+
keltnerChannelMultiplier;
|
|
1454
|
+
constructor(parameters) {
|
|
1455
|
+
requireStreamParameters('SqueezeStream.constructor#0', 'SqueezeStream', parameters);
|
|
1456
|
+
const { bollingerBandPeriod, bollingerStandardDeviations, keltnerChannelPeriod, keltnerChannelMultiplier, } = parameters;
|
|
1457
|
+
this.keltnerChannelMultiplier = keltnerChannelMultiplier;
|
|
1458
|
+
this.core = new SqueezeCore({
|
|
1459
|
+
bollingerBandPeriod,
|
|
1460
|
+
bollingerStandardDeviations,
|
|
1461
|
+
keltnerChannelPeriod,
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
next(bar) {
|
|
1465
|
+
const o = this.core.update(bar);
|
|
1466
|
+
if (o === null) {
|
|
1467
|
+
this.value = null;
|
|
1468
|
+
return null;
|
|
1469
|
+
}
|
|
1470
|
+
const upperKC = o.keltnerChannelMiddle + this.keltnerChannelMultiplier * o.keltnerChannelRange;
|
|
1471
|
+
const lowerKC = o.keltnerChannelMiddle - this.keltnerChannelMultiplier * o.keltnerChannelRange;
|
|
1472
|
+
const on = o.lowerBollingerBand > lowerKC && o.upperBollingerBand < upperKC ? 1 : 0;
|
|
1473
|
+
this.value = { on, momentum: o.momentum };
|
|
1474
|
+
return this.value;
|
|
1475
|
+
}
|
|
1476
|
+
toJSON() {
|
|
1477
|
+
return snapshotOf('squeeze', {
|
|
1478
|
+
keltnerChannelMultiplier: this.keltnerChannelMultiplier,
|
|
1479
|
+
core: this.core.toJSON(),
|
|
1480
|
+
value: this.value,
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
static fromJSON(snapshot) {
|
|
1484
|
+
const state = readSnapshot(snapshot, 'squeeze');
|
|
1485
|
+
const x = new SqueezeStream({
|
|
1486
|
+
bollingerBandPeriod: 1,
|
|
1487
|
+
bollingerStandardDeviations: 1,
|
|
1488
|
+
keltnerChannelPeriod: 1,
|
|
1489
|
+
keltnerChannelMultiplier: state.number('keltnerChannelMultiplier'),
|
|
1490
|
+
});
|
|
1491
|
+
x.core = SqueezeCore.fromJSON(state.child('core'));
|
|
1492
|
+
x.value = state.cached('value');
|
|
1493
|
+
return x;
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
export const squeeze = withBuiltinMetadata(makeIndicator((p) => new SqueezeStream({
|
|
1497
|
+
bollingerBandPeriod: requirePeriod(p.bollingerBandPeriod ?? 20, 'squeeze', 'bollingerBandPeriod'),
|
|
1498
|
+
bollingerStandardDeviations: requirePositive(p.bollingerStandardDeviations ?? 2, 'squeeze', 'bollingerStandardDeviations'),
|
|
1499
|
+
keltnerChannelPeriod: requirePeriod(p.keltnerChannelPeriod ?? 20, 'squeeze', 'keltnerChannelPeriod'),
|
|
1500
|
+
keltnerChannelMultiplier: requirePositive(p.keltnerChannelMultiplier ?? 1.5, 'squeeze', 'keltnerChannelMultiplier'),
|
|
1501
|
+
}), SqueezeStream.fromJSON, () => ({ on: NaN, momentum: NaN })), builtinMetadata.squeezeMetadata);
|
|
1502
|
+
class SqueezeProStream {
|
|
1503
|
+
core;
|
|
1504
|
+
value = null;
|
|
1505
|
+
wideKeltnerChannelMultiplier;
|
|
1506
|
+
normalKeltnerChannelMultiplier;
|
|
1507
|
+
narrowKeltnerChannelMultiplier;
|
|
1508
|
+
constructor(parameters) {
|
|
1509
|
+
requireStreamParameters('SqueezeProStream.constructor#0', 'SqueezeProStream', parameters);
|
|
1510
|
+
const { bollingerBandPeriod, bollingerStandardDeviations, keltnerChannelPeriod, wideKeltnerChannelMultiplier, normalKeltnerChannelMultiplier, narrowKeltnerChannelMultiplier, } = parameters;
|
|
1511
|
+
this.wideKeltnerChannelMultiplier = wideKeltnerChannelMultiplier;
|
|
1512
|
+
this.normalKeltnerChannelMultiplier = normalKeltnerChannelMultiplier;
|
|
1513
|
+
this.narrowKeltnerChannelMultiplier = narrowKeltnerChannelMultiplier;
|
|
1514
|
+
this.core = new SqueezeCore({
|
|
1515
|
+
bollingerBandPeriod,
|
|
1516
|
+
bollingerStandardDeviations,
|
|
1517
|
+
keltnerChannelPeriod,
|
|
1518
|
+
});
|
|
1519
|
+
}
|
|
1520
|
+
inside(o, mult) {
|
|
1521
|
+
return o.lowerBollingerBand > o.keltnerChannelMiddle - mult * o.keltnerChannelRange &&
|
|
1522
|
+
o.upperBollingerBand < o.keltnerChannelMiddle + mult * o.keltnerChannelRange
|
|
1523
|
+
? 1
|
|
1524
|
+
: 0;
|
|
1525
|
+
}
|
|
1526
|
+
next(bar) {
|
|
1527
|
+
const o = this.core.update(bar);
|
|
1528
|
+
if (o === null) {
|
|
1529
|
+
this.value = null;
|
|
1530
|
+
return null;
|
|
1531
|
+
}
|
|
1532
|
+
this.value = {
|
|
1533
|
+
lowCompression: this.inside(o, this.wideKeltnerChannelMultiplier),
|
|
1534
|
+
normalCompression: this.inside(o, this.normalKeltnerChannelMultiplier),
|
|
1535
|
+
highCompression: this.inside(o, this.narrowKeltnerChannelMultiplier),
|
|
1536
|
+
momentum: o.momentum,
|
|
1537
|
+
};
|
|
1538
|
+
return this.value;
|
|
1539
|
+
}
|
|
1540
|
+
toJSON() {
|
|
1541
|
+
return snapshotOf('squeezePro', {
|
|
1542
|
+
wideKeltnerChannelMultiplier: this.wideKeltnerChannelMultiplier,
|
|
1543
|
+
normalKeltnerChannelMultiplier: this.normalKeltnerChannelMultiplier,
|
|
1544
|
+
narrowKeltnerChannelMultiplier: this.narrowKeltnerChannelMultiplier,
|
|
1545
|
+
core: this.core.toJSON(),
|
|
1546
|
+
value: this.value,
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
static fromJSON(snapshot) {
|
|
1550
|
+
const state = readSnapshot(snapshot, 'squeezePro');
|
|
1551
|
+
const x = new SqueezeProStream({
|
|
1552
|
+
bollingerBandPeriod: 1,
|
|
1553
|
+
bollingerStandardDeviations: 1,
|
|
1554
|
+
keltnerChannelPeriod: 1,
|
|
1555
|
+
wideKeltnerChannelMultiplier: state.number('wideKeltnerChannelMultiplier'),
|
|
1556
|
+
normalKeltnerChannelMultiplier: state.number('normalKeltnerChannelMultiplier'),
|
|
1557
|
+
narrowKeltnerChannelMultiplier: state.number('narrowKeltnerChannelMultiplier'),
|
|
1558
|
+
});
|
|
1559
|
+
x.core = SqueezeCore.fromJSON(state.child('core'));
|
|
1560
|
+
x.value = state.cached('value');
|
|
1561
|
+
return x;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
/**
|
|
1565
|
+
* The three Keltner multipliers, each validated as a NUMBER before their ORDERING is judged.
|
|
1566
|
+
*
|
|
1567
|
+
* RV10 — order of validation is part of the contract. This checked `wide > normal > narrow` first
|
|
1568
|
+
* and left positivity to three separate `requirePositive` calls spread in after it, so
|
|
1569
|
+
* `wideKeltnerChannelMultiplier: NaN` reported `input.out_of_range` with the message "must satisfy
|
|
1570
|
+
* wideKeltnerChannelMultiplier > normalKeltnerChannelMultiplier > …". `NaN > 1.5` is false, so a
|
|
1571
|
+
* TYPE failure was reported as a RELATION failure, and the caller was told to reorder three numbers
|
|
1572
|
+
* when one of them was not a number. `Infinity` happened to read correctly only because
|
|
1573
|
+
* `Infinity > 1.5` is true and it fell through to the finiteness check — the taxonomy was right by
|
|
1574
|
+
* luck on one input class and wrong on the other.
|
|
1575
|
+
*
|
|
1576
|
+
* Ordering is a relation between three already-valid numbers, so it cannot be judged until they are
|
|
1577
|
+
* known to be numbers. Validating and returning them here also removes the duplicate
|
|
1578
|
+
* `requirePositive` calls at the call site, where the object-literal evaluation order was the only
|
|
1579
|
+
* thing sequencing the two checks.
|
|
1580
|
+
*/
|
|
1581
|
+
function requireOrderedMultipliers(p) {
|
|
1582
|
+
const wide = requirePositive(p.wideKeltnerChannelMultiplier ?? 2.0, 'squeezePro', 'wideKeltnerChannelMultiplier');
|
|
1583
|
+
const normal = requirePositive(p.normalKeltnerChannelMultiplier ?? 1.5, 'squeezePro', 'normalKeltnerChannelMultiplier');
|
|
1584
|
+
const narrow = requirePositive(p.narrowKeltnerChannelMultiplier ?? 1.0, 'squeezePro', 'narrowKeltnerChannelMultiplier');
|
|
1585
|
+
if (!(wide > normal && normal > narrow)) {
|
|
1586
|
+
throw new InputError('squeezePro: the Keltner multipliers must satisfy ' +
|
|
1587
|
+
'wideKeltnerChannelMultiplier > normalKeltnerChannelMultiplier > ' +
|
|
1588
|
+
`narrowKeltnerChannelMultiplier; got wideKeltnerChannelMultiplier=${wide}, ` +
|
|
1589
|
+
`normalKeltnerChannelMultiplier=${normal}, narrowKeltnerChannelMultiplier=${narrow}.` +
|
|
1590
|
+
'\n e.g. squeezePro(bars, { wideKeltnerChannelMultiplier: 2, ' +
|
|
1591
|
+
'normalKeltnerChannelMultiplier: 1.5, narrowKeltnerChannelMultiplier: 1 })', {
|
|
1592
|
+
code: ErrorCode.InputOutOfRange,
|
|
1593
|
+
context: {
|
|
1594
|
+
function: 'squeezePro',
|
|
1595
|
+
wideKeltnerChannelMultiplier: wide,
|
|
1596
|
+
normalKeltnerChannelMultiplier: normal,
|
|
1597
|
+
narrowKeltnerChannelMultiplier: narrow,
|
|
1598
|
+
},
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
return {
|
|
1602
|
+
wideKeltnerChannelMultiplier: wide,
|
|
1603
|
+
normalKeltnerChannelMultiplier: normal,
|
|
1604
|
+
narrowKeltnerChannelMultiplier: narrow,
|
|
1605
|
+
};
|
|
1606
|
+
}
|
|
1607
|
+
export const squeezePro = withBuiltinMetadata(makeIndicator((p) => new SqueezeProStream({
|
|
1608
|
+
bollingerBandPeriod: requirePeriod(p.bollingerBandPeriod ?? 20, 'squeezePro', 'bollingerBandPeriod'),
|
|
1609
|
+
bollingerStandardDeviations: requirePositive(p.bollingerStandardDeviations ?? 2, 'squeezePro', 'bollingerStandardDeviations'),
|
|
1610
|
+
keltnerChannelPeriod: requirePeriod(p.keltnerChannelPeriod ?? 20, 'squeezePro', 'keltnerChannelPeriod'),
|
|
1611
|
+
...requireOrderedMultipliers(p),
|
|
1612
|
+
}), SqueezeProStream.fromJSON, () => ({ lowCompression: NaN, normalCompression: NaN, highCompression: NaN, momentum: NaN })), builtinMetadata.squeezeProMetadata);
|
|
1613
|
+
class ProjectionOscillatorStream {
|
|
1614
|
+
period;
|
|
1615
|
+
lin;
|
|
1616
|
+
highs = [];
|
|
1617
|
+
lows = [];
|
|
1618
|
+
value = null;
|
|
1619
|
+
constructor(period) {
|
|
1620
|
+
this.period = period;
|
|
1621
|
+
requirePeriod(period, 'ProjectionOscillatorStream');
|
|
1622
|
+
this.lin = new LinregStream(period);
|
|
1623
|
+
}
|
|
1624
|
+
next(bar) {
|
|
1625
|
+
const lr = this.lin.next(bar.close);
|
|
1626
|
+
this.highs.push(bar.high);
|
|
1627
|
+
this.lows.push(bar.low);
|
|
1628
|
+
if (this.highs.length > this.period) {
|
|
1629
|
+
this.highs.shift();
|
|
1630
|
+
this.lows.shift();
|
|
1631
|
+
}
|
|
1632
|
+
if (lr === null || this.highs.length < this.period) {
|
|
1633
|
+
this.value = null;
|
|
1634
|
+
return null;
|
|
1635
|
+
}
|
|
1636
|
+
const slope = lr.slope;
|
|
1637
|
+
const n = this.period;
|
|
1638
|
+
let pu = -Infinity;
|
|
1639
|
+
let pl = Infinity;
|
|
1640
|
+
for (let i = 0; i < n; i++) {
|
|
1641
|
+
// i bars ago, projected forward to now along the regression slope
|
|
1642
|
+
const hi = this.highs[n - 1 - i] + slope * i;
|
|
1643
|
+
const lo = this.lows[n - 1 - i] + slope * i;
|
|
1644
|
+
if (hi > pu)
|
|
1645
|
+
pu = hi;
|
|
1646
|
+
if (lo < pl)
|
|
1647
|
+
pl = lo;
|
|
1648
|
+
}
|
|
1649
|
+
const po = pu === pl ? 50 : (100 * (bar.close - pl)) / (pu - pl);
|
|
1650
|
+
this.value = { po, upper: pu, lower: pl };
|
|
1651
|
+
return this.value;
|
|
1652
|
+
}
|
|
1653
|
+
toJSON() {
|
|
1654
|
+
return snapshotOf('projectionOscillator', {
|
|
1655
|
+
period: this.period,
|
|
1656
|
+
lin: this.lin.toJSON(),
|
|
1657
|
+
highs: [...this.highs],
|
|
1658
|
+
lows: [...this.lows],
|
|
1659
|
+
value: this.value,
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
static fromJSON(snapshot) {
|
|
1663
|
+
const state = readSnapshot(snapshot, 'projectionOscillator');
|
|
1664
|
+
const x = new ProjectionOscillatorStream(state.lookback('period'));
|
|
1665
|
+
x.lin = LinregStream.fromJSON(state.child('lin'));
|
|
1666
|
+
x.highs = state.numbers('highs');
|
|
1667
|
+
x.lows = state.numbers('lows');
|
|
1668
|
+
x.value = state.cached('value');
|
|
1669
|
+
return x;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
export const projectionOscillator = withBuiltinMetadata(makeIndicator((p) => new ProjectionOscillatorStream(requirePeriod(p.period ?? 14, 'projectionOscillator')), ProjectionOscillatorStream.fromJSON, () => ({ po: NaN, upper: NaN, lower: NaN })), builtinMetadata.projectionOscillatorMetadata);
|
|
1673
|
+
/**
|
|
1674
|
+
* Core TD Sequential: the price-flip setup (1–9) and a basic countdown (1–13). This implements the
|
|
1675
|
+
* essential setup/countdown signal, not the full DeMark ruleset (no perfection / cancellation /
|
|
1676
|
+
* deferral qualifiers).
|
|
1677
|
+
*/
|
|
1678
|
+
class TdSequentialStream {
|
|
1679
|
+
lookback;
|
|
1680
|
+
closes = []; // last lookback+1 closes
|
|
1681
|
+
bars = []; // last 3 bars (for low[2]/high[2])
|
|
1682
|
+
buySetup = 0;
|
|
1683
|
+
sellSetup = 0;
|
|
1684
|
+
armed = 0; // +1 sell countdown, −1 buy countdown, 0 none
|
|
1685
|
+
countdown = 0;
|
|
1686
|
+
value = null;
|
|
1687
|
+
constructor(lookback) {
|
|
1688
|
+
this.lookback = lookback;
|
|
1689
|
+
requirePeriod(lookback, 'TdSequentialStream', 'lookback', 1, 'bars');
|
|
1690
|
+
}
|
|
1691
|
+
next(bar) {
|
|
1692
|
+
this.closes.push(bar.close);
|
|
1693
|
+
if (this.closes.length > this.lookback + 1)
|
|
1694
|
+
this.closes.shift();
|
|
1695
|
+
this.bars.push(bar);
|
|
1696
|
+
if (this.bars.length > 3)
|
|
1697
|
+
this.bars.shift();
|
|
1698
|
+
if (this.closes.length < this.lookback + 1) {
|
|
1699
|
+
this.value = null;
|
|
1700
|
+
return null;
|
|
1701
|
+
}
|
|
1702
|
+
const refClose = this.closes[0]; // `lookback` bars ago
|
|
1703
|
+
let setup = 0;
|
|
1704
|
+
let direction = 0;
|
|
1705
|
+
if (bar.close < refClose) {
|
|
1706
|
+
const was = this.buySetup;
|
|
1707
|
+
this.buySetup = Math.min(this.buySetup + 1, 9);
|
|
1708
|
+
this.sellSetup = 0;
|
|
1709
|
+
if (was === 8 && this.buySetup === 9) {
|
|
1710
|
+
this.armed = -1;
|
|
1711
|
+
this.countdown = 0;
|
|
1712
|
+
}
|
|
1713
|
+
setup = this.buySetup;
|
|
1714
|
+
direction = -1;
|
|
1715
|
+
}
|
|
1716
|
+
else if (bar.close > refClose) {
|
|
1717
|
+
const was = this.sellSetup;
|
|
1718
|
+
this.sellSetup = Math.min(this.sellSetup + 1, 9);
|
|
1719
|
+
this.buySetup = 0;
|
|
1720
|
+
if (was === 8 && this.sellSetup === 9) {
|
|
1721
|
+
this.armed = 1;
|
|
1722
|
+
this.countdown = 0;
|
|
1723
|
+
}
|
|
1724
|
+
setup = this.sellSetup;
|
|
1725
|
+
direction = 1;
|
|
1726
|
+
}
|
|
1727
|
+
else {
|
|
1728
|
+
this.buySetup = 0;
|
|
1729
|
+
this.sellSetup = 0;
|
|
1730
|
+
}
|
|
1731
|
+
if (this.armed !== 0 && this.bars.length === 3) {
|
|
1732
|
+
const ago2 = this.bars[0]; // 2 bars ago
|
|
1733
|
+
if (this.armed === -1 && bar.close <= ago2.low && this.countdown < 13)
|
|
1734
|
+
this.countdown++;
|
|
1735
|
+
else if (this.armed === 1 && bar.close >= ago2.high && this.countdown < 13)
|
|
1736
|
+
this.countdown++;
|
|
1737
|
+
if (this.countdown >= 13)
|
|
1738
|
+
this.armed = 0; // countdown complete
|
|
1739
|
+
}
|
|
1740
|
+
this.value = { setup, countdown: this.countdown, direction };
|
|
1741
|
+
return this.value;
|
|
1742
|
+
}
|
|
1743
|
+
toJSON() {
|
|
1744
|
+
return snapshotOf('tdSequential', {
|
|
1745
|
+
lookback: this.lookback,
|
|
1746
|
+
closes: [...this.closes],
|
|
1747
|
+
bars: this.bars.map((x) => ({ ...x })),
|
|
1748
|
+
buySetup: this.buySetup,
|
|
1749
|
+
sellSetup: this.sellSetup,
|
|
1750
|
+
armed: this.armed,
|
|
1751
|
+
countdown: this.countdown,
|
|
1752
|
+
value: this.value,
|
|
1753
|
+
});
|
|
1754
|
+
}
|
|
1755
|
+
static fromJSON(snapshot) {
|
|
1756
|
+
const state = readSnapshot(snapshot, 'tdSequential');
|
|
1757
|
+
const x = new TdSequentialStream(state.lookback('lookback'));
|
|
1758
|
+
Object.assign(x, {
|
|
1759
|
+
buySetup: state.number('buySetup'),
|
|
1760
|
+
sellSetup: state.number('sellSetup'),
|
|
1761
|
+
armed: state.number('armed'),
|
|
1762
|
+
countdown: state.number('countdown'),
|
|
1763
|
+
});
|
|
1764
|
+
x.closes = state.numbers('closes');
|
|
1765
|
+
x.bars = state.records('bars').map((y) => ({ ...y }));
|
|
1766
|
+
x.value = state.cached('value');
|
|
1767
|
+
return x;
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
export const tdSequential = withBuiltinMetadata(makeIndicator((p) => new TdSequentialStream(requirePeriod(p.lookback ?? 4, 'tdSequential', 'lookback')), TdSequentialStream.fromJSON, () => ({ setup: NaN, countdown: NaN, direction: NaN })), builtinMetadata.tdSequentialMetadata);
|
|
1771
|
+
export { BiasStream, LinregOscStream, CoppockStream, CtiStream, EfficiencyRatioStream, CenterOfGravityStream, PsychologicalLineStream, SlopeStream, PvoStream, ElderRayStream, BrarStream, KdjStream, RvgiStream, PgoStream, TrixHistogramStream, SmiErgodicStream, VolumeWeightedMacdStream, InertiaStream, LaguerreRsiStream, QqeStream, RsxStream, SchaffTrendCycleStream, SqueezeCore, SqueezeStream, SqueezeProStream, ProjectionOscillatorStream, TdSequentialStream, };
|
|
1772
|
+
//# sourceMappingURL=momentum-ext.js.map
|