From 92a5f28873e6aa425f0b284a63b70a2187664627 Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Mon, 20 Nov 2023 17:28:04 +0400 Subject: [PATCH] state.volume --- cvx/simulator/builder.py | 3 +++ tests/test_builder.py | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cvx/simulator/builder.py b/cvx/simulator/builder.py index ef73c98d..e783d1ed 100644 --- a/cvx/simulator/builder.py +++ b/cvx/simulator/builder.py @@ -151,6 +151,9 @@ def update( # builder is frozen, so we can't construct a new state return self + def __getattr__(self, item): + return self.input_data[item] + def builder( prices: pd.DataFrame, diff --git a/tests/test_builder.py b/tests/test_builder.py index cebc81f5..3c56acc9 100644 --- a/tests/test_builder.py +++ b/tests/test_builder.py @@ -266,8 +266,6 @@ def test_returns(prices): def test_cov(prices): b = _builder(prices=prices, initial_cash=50000) for time, mat in b.cov(min_periods=50, com=50): - # print(time) - # print(mat) assert np.all(np.isfinite(mat))