Fix test warnings
This commit is contained in:
parent
7e4a880ca9
commit
c94fe5312c
|
|
@ -17,4 +17,4 @@ def var(portfolio, prices, sort="ascending"):
|
|||
pnl = portfolio.dot(returns.T)
|
||||
daily_pnl = pnl.sum(axis=0)
|
||||
daily_pnl_asc = daily_pnl.sort_values(ascending=True)
|
||||
return 0.4 * daily_pnl_asc[1] + 0.6 * daily_pnl_asc[2]
|
||||
return 0.4 * daily_pnl_asc.iloc[1] + 0.6 * daily_pnl_asc.iloc[2]
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ def test_end_to_end():
|
|||
os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "var_fx_prices.csv"),
|
||||
parse_dates=["date"],
|
||||
index_col="date",
|
||||
dayfirst=True,
|
||||
dtype=float,
|
||||
)
|
||||
fx_prices.sort_index(inplace=True, ascending=True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue