File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 99 import pandas as pd
1010 import plotly .io as pio
1111 import polars as pl
12+ from cvxsimulator import interpolate
1213
1314 # Ensure Plotly works with Marimo
1415 pio .renderers .default = "plotly_mimetype"
@@ -28,7 +29,7 @@ def _():
2829@app .cell
2930def _ ():
3031 # this cell should be made obsolete by the Simulator accepting polar frames
31- from cvx .simulator import interpolate
32+ # from cvx.simulator import interpolate
3233 # from cvx.simulator.builder import polars2pandas
3334
3435 # print(prices_pl)
@@ -38,6 +39,7 @@ def _():
3839 prices = prices_pd .apply (interpolate )
3940 # print(prices)
4041 # return
42+ return prices
4143
4244
4345@app .function
@@ -59,14 +61,14 @@ def _():
5961
6062
6163@app .cell
62- def _ (fast , slow ):
64+ def _ (fast , slow , prices ):
6365 pos = 5e6 * prices .apply (f , fast = fast .value , slow = slow .value ).fillna (0.0 )
6466 return (pos ,)
6567
6668
6769@app .cell
68- def _ (pos ):
69- from cvx . simulator import Portfolio
70+ def _ (pos , prices ):
71+ from cvxsimulator import Portfolio
7072 # builder = Builder(prices=prices, initial_aum=1e8)
7173
7274 # for t, state in builder:
You can’t perform that action at this time.
0 commit comments