feat(portfolio): definizioni PORT01-06 + report run() (default PORT06)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 15:58:33 +02:00
parent 3f6b0ccf91
commit eaf4800b6d
9 changed files with 225 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from scripts.portfolios._defs import PORTFOLIOS
def test_six_portfolios_defined():
assert set(PORTFOLIOS) == {"PORT01", "PORT02", "PORT03", "PORT04", "PORT05", "PORT06"}
def test_port06_is_master_shape_cap():
p = PORTFOLIOS["PORT06"]
sids = set(p.sleeve_ids)
assert {"SH_BTC", "SH_ETH", "TSM01", "PR_ETHBTC"} <= sids
assert len(sids) == 17
assert p.weighting == "cap" and p.caps == {"PAIRS": 0.33}
def test_default_leverage_sober():
assert PORTFOLIOS["PORT06"].leverage == 2.0