[IMPROVE] Regplot of 2 Stocks
What's the feature that should be improved? Regplot (through seaborn) of the daily % change (or any period) of 2 given stocks. Example I have below is PDD & kweb, this is implemented on Bloomberg & some other pro platforms & is extremely trivial to implement given OpenBB's stack.
I'm thinking this should go under stocks.qa?
My current toy implemntation works like so. index['kweb'] = kweb['Close'] (both DFs obtained from openbb.stocks.load). index['pdd'] = pdd['Close'] chg = index.copy() for col in chg.columns: chg[col] = chg[col].pct_change(1)
sb.regplot(x=chg['pdd'], y=chg['kweb'])
Describe how you would like the feature improved
Produces a plot like so of PDD & KWEB
Possibly describe the ideal way to improve this Can turn price series into % change series by using df.pct_change(1), may be some value in letting the 1 be replacable.
I am reading through the contribution guide as we speak in terms of implementing this. Can write the code myself. Would appreciate any input in terms of inputs (such as number of days, startdate) that might be useful to this function.
Thoughts on how stocks/qa/beta is implemented? That gives the same chart just in our parlay format.
(embarrassingly) I was unaware it existed until I got into the code tree (may be worth expanding the help, I was expecting it just to print the beta). It does exactly what I want it to do, I have a second one I want to add (corr between stocks). I think I have it implemented correctly, just need to test, https://github.com/alice-comfy/OpenBBTerminal
I've had a bit of difficulty building on WSL2 & Mac (bizarre error, might be my environment), will setup a regular Ubuntu Desktop VM to try.
Given WSLG now exists I think the VCXserv instructions on the site are outdated? 99% of the time I just use a notebook when doing graphical stuff with WSL, but I can spawn a matplotlib window with WSLG fine. Not sure what the dependencies are for OpenBB plot.
https://docs.openbb.co/terminal/installation/source