You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running the following example and i accept it works perfectly, output as expected.
import numpy as np
from empyrical import roll_max_drawdown
returns = np.array([.01, .02, .03, -.4, -.06, -.02])
# calculate the rolling max drawdown
roll_max_drawdown(returns, window=3)
I was wondering is there a way to force the result/output to be the same shape/length as the original array?
e.g output would be 6 rather than 4 with the first to values = nan?
Reason: I'm trying to transform this function across a dataframe and it comee back with "Length of passed values is 4, index implies 6"
I'm running the following example and i accept it works perfectly, output as expected.
I was wondering is there a way to force the result/output to be the same shape/length as the original array?
e.g output would be 6 rather than 4 with the first to values = nan?
Reason: I'm trying to transform this function across a dataframe and it comee back with "Length of passed values is 4, index implies 6"
My hack workaround is to modify unary_vectorized_roll to end with the following
Is there a better way?
The text was updated successfully, but these errors were encountered: