import%20marimo%0A%0A__generated_with%20%3D%20%220.14.10%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22)%0A%0Awith%20app.setup%3A%0A%20%20%20%20import%20plotly.io%20as%20pio%0A%20%20%20%20import%20polars%20as%20pl%0A%0A%20%20%20%20import%20jquantstats%20as%20jqs%0A%0A%20%20%20%20%23%20Ensure%20Plotly%20works%20with%20Marimo%0A%20%20%20%20pio.renderers.default%20%3D%20%22plotly_mimetype%22%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%0A%20%20%20%20return%20(mo%2C)%0A%0A%0A%40app.cell%0Adef%20_download(mo)%3A%0A%20%20%20%20returns%20%3D%20pl.read_csv(str(mo.notebook_location()%20%2F%20%22public%22%20%2F%20%22portfolio.csv%22)%2C%20try_parse_dates%3DTrue).with_columns(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20pl.col(%22AAPL%22).cast(pl.Float64%2C%20strict%3DFalse)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20pl.col(%22META%22).cast(pl.Float64%2C%20strict%3DFalse)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20pl.col(%22Date%22).cast(pl.Date%2C%20strict%3DFalse)%2C%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20)%0A%0A%20%20%20%20benchmark%20%3D%20pl.read_csv(str(mo.notebook_location()%20%2F%20%22public%22%20%2F%20%22benchmark.csv%22)%2C%20try_parse_dates%3DTrue)%0A%20%20%20%20return%20benchmark%2C%20returns%0A%0A%0A%40app.cell%0Adef%20_(benchmark%2C%20returns)%3A%0A%20%20%20%20data%20%3D%20jqs.build_data(returns%3Dreturns%2C%20benchmark%3Dbenchmark%2C%20date_col%3D%22Date%22)%0A%20%20%20%20return%20(data%2C)%0A%0A%0A%40app.cell%0Adef%20_(data)%3A%0A%20%20%20%20fig%20%3D%20data.plots.plot_snapshot(log_scale%3DTrue)%0A%20%20%20%20fig%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
cc7167dee1791d081aa12fe4c862ef5f55e0a5d9670ea4e30bb637884403cc0d