mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-12-01 13:44:16 +00:00
Fix volatility (#2173)
* Make sec fillings link clickable in report * fix volatility Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
@@ -1516,7 +1516,7 @@ def show_quick_performance(stock_df: pd.DataFrame, ticker: str):
|
||||
df = df.applymap(lambda x: f"[red]{x}[/red]" if "-" in x else f"[green]{x}[/green]")
|
||||
if len(closes) > 252:
|
||||
df["Volatility (1Y)"] = (
|
||||
str(round(100 * np.sqrt(252) * closes[:-252].pct_change().std(), 2)) + " %"
|
||||
str(round(100 * np.sqrt(252) * closes[-252:].pct_change().std(), 2)) + " %"
|
||||
)
|
||||
else:
|
||||
df["Volatility (Ann)"] = (
|
||||
|
||||
Reference in New Issue
Block a user