canli-quant-mcp 0.0.0-stage → 0.1.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,70 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.1.2
6
+
7
+ This cumulative npm candidate includes the statistical and input corrections recorded under
8
+ 0.1.1 below. The 0.1.1 source archive stays available; it will not be published separately to npm.
9
+
10
+ - Non-finite computed results now return a tool error naming their fields and values before JSON
11
+ serialization or success receipt creation. Previously NaN and Infinity appeared as null with no
12
+ diagnostic. Both discovery and directly listed tools use the same result check. Ordinary finite
13
+ answers and legitimate null warm-up positions retain their existing representation.
14
+
15
+ ## 0.1.1 (signed source release; not published to npm)
16
+
17
+ - Fix: an asset whose returns never change made `covariance_shrinkage`, `correlation_matrix` and
18
+ the portfolio optimizers (`max_sharpe_portfolio`, `min_variance_portfolio` and the others built
19
+ on the same estimates) answer with NaN. They now refuse and name the asset ("CASH has no
20
+ variance").
21
+ - Fix: `put_call_parity` gave NaN for `implied_carry` when the quotes put the implied forward at or
22
+ below zero. It now gives null with a note to check the quotes for staleness. Both were found by
23
+ canli-mcp's `bench/robustness.mjs`.
24
+ - Fix: `digits` also rounded whole numbers, so `digits: 4` turned 227,917,808 into 227,900,000.
25
+ It now trims fractions only; whole numbers and the integer part of large values stay exact.
26
+
27
+
28
+ - `deflated_sharpe_ratio` and `probabilistic_sharpe_ratio` also take summary numbers (`sharpe_annual`,
29
+ `observations`, `skew`, `kurtosis`) and refuse fewer than 20 returns or zero variance, instead of
30
+ returning a probability from too little data. Found by watching a model call them in an agent
31
+ evaluation.
32
+ - `sleeve_tournament`: Hansen's SPA and Romano-Wolf StepM are now re-studentized in every resample,
33
+ the default mean block length is round(n^(1/3)) instead of floor(sqrt(n)), and White's Reality
34
+ Check is reported alongside. The 0.1.0 version held one variance estimate fixed across resamples,
35
+ which the Null Zoo benchmark measured rejecting 13.5% of skill-less AR(1) searches at a nominal
36
+ 5% with long blocks; on our planted-trend test data it kept 24 sleeves where the corrected test
37
+ keeps 4.
38
+
39
+ - `sleeve_tournament` verdict: no longer calls the effective-trials deflation "the fairer one"; on
40
+ data with no edge it nearly passes a long-only winner. The verdict now says the raw count is the
41
+ conservative bound and that deflation (Sharpe above zero) and SPA/StepM (beats the benchmark)
42
+ answer different questions.
43
+
44
+ ## 0.1.0
45
+
46
+ First release: 235 tools in 18 toolsets (performance, options, exotics, rates, tvm, valuation,
47
+ portfolio, risk, returns, econometrics, indicators, execution, sizing, crypto_fx, strategies,
48
+ sleeves, data_checks, labeling), reached through three discovery tools (`find_tool`, `describe_tool`,
49
+ `run_tool`) or listed directly with `CANLI_TOOLSETS`.
50
+
51
+ - A library of 399 strategy sleeves in 18 families, each with a fixed rule, references and a spec
52
+ hash, and tools that run them all on your prices with the corrections a many-strategy search
53
+ needs: deflated Sharpe (raw and effective trials), Hansen's SPA, Romano-Wolf StepM, CSCV
54
+ probability of backtest overfitting, walk-forward selection, clustering and regime maps.
55
+ `run_sleeve` and `combine_sleeves` return target weights by symbol for a paper rebalance.
56
+ - 18 strategy recipes on one costed, drift-aware engine with no lookahead.
57
+ - Deeper analytics: Markov regime switching, Johansen cointegration, CUSUM parameter stability,
58
+ Chow breaks, HAR volatility forecasts, realized volatility with jump tests, rank, distance and
59
+ tail dependence, block-bootstrap confidence intervals, extreme value tails, a VIX-method
60
+ implied volatility, risk-neutral densities and Merton credit risk.
61
+ - Data annotation and ML labels: a per-period annotator, CUSUM event sampling, triple-barrier,
62
+ meta, fixed-horizon and trend-scanning labels, sample weights, and purged, embargoed CV splits.
63
+ - Privacy enforced by tests: no network, disk writes, logging, processes or workers; runs under
64
+ Node's permission model.
65
+ - 465 reference cases against QuantLib, statsmodels, arch, TA-Lib, numpy-financial, scikit-learn,
66
+ empyrical, scipy, pandas and dcor; planted-defect tests for the data checks; no-lookahead and warm-up
67
+ checks on every sleeve.
68
+ - Eleven workflow prompts, six resources, and opt-in calculation receipts.
69
+ - BM25 tool search (94% right first, 99% in the top three on 110 test requests) and a `digits`
70
+ option on `run_tool` for shorter outputs.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arhan Canli / Canli Capital
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.