import%20marimo%0A%0A__generated_with%20%3D%20%220.14.16%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22)%0A%0Awith%20app.setup%3A%0A%20%20%20%20import%20plotly.graph_objects%20as%20go%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20from%20openbb%20import%20obb%0A%0A%20%20%20%20%23%20Fetch%20historical%20prices%20for%20AAPL%0A%20%20%20%20result%20%3D%20obb.equity.price.historical(symbol%3D%22AAPL%22)%0A%0A%20%20%20%20%23%20Convert%20OBObject%20to%20DataFrame%0A%20%20%20%20df%20%3D%20result.to_dataframe()%0A%0A%20%20%20%20%23%20Reset%20index%20to%20make%20date%20a%20regular%20column%0A%20%20%20%20df%20%3D%20df.reset_index()%0A%0A%20%20%20%20%23%20Make%20sure%20Date%20is%20sorted%20ascending%0A%20%20%20%20df%20%3D%20df.sort_values(%22date%22)%0A%0A%20%20%20%20return%20(df%2C)%0A%0A%0A%40app.cell%0Adef%20_(df)%3A%0A%20%20%20%20%23%20Create%20a%20Plotly%20candlestick%20chart%0A%20%20%20%20fig%20%3D%20go.Figure(%0A%20%20%20%20%20%20%20%20data%3D%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20go.Candlestick(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20x%3Ddf%5B%22date%22%5D%2C%20open%3Ddf%5B%22open%22%5D%2C%20high%3Ddf%5B%22high%22%5D%2C%20low%3Ddf%5B%22low%22%5D%2C%20close%3Ddf%5B%22close%22%5D%2C%20name%3D%22AAPL%22%0A%20%20%20%20%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20)%0A%0A%20%20%20%20fig.update_layout(%0A%20%20%20%20%20%20%20%20title%3D%22AAPL%20Historical%20Prices%22%2C%0A%20%20%20%20%20%20%20%20yaxis_title%3D%22Price%20(USD)%22%2C%0A%20%20%20%20%20%20%20%20xaxis_title%3D%22Date%22%2C%0A%20%20%20%20%20%20%20%20template%3D%22plotly_dark%22%2C%0A%20%20%20%20%20%20%20%20xaxis_rangeslider_visible%3DFalse%2C%0A%20%20%20%20)%0A%0A%20%20%20%20fig.show()%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
df7f267116d9d606ff75ee5d91e83a32b08944b0f6104950c5595cf5dffb99a0