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 getting the exception: raise ValueError("order.price must be finite and greater than 0")
But testing the values of df_price_filtered as follows:
mask_combinada = (df_price_filtered < 0) | (~np.isfinite(df_price_filtered))
linhas_com_issues = df_price_filtered[mask_combinada.any(axis=1)]
if not linhas_com_issues.empty:
print("\nLines with values less than 0 or not finite:")
print(linhas_com_issues)
else:
print("\nNo line contains values less than 0 or not finite.")
I'm getting the answer: No line contains values less than 0 or not finite.
Python: 3.11.9
vectorbt: 0.26.2
The text was updated successfully, but these errors were encountered:
My code:
...
df_close_filtered = df_closes[df_closes.index >= reference_date].values
df_price_filtered = df_prices[df_prices.index >= reference_date].values
df_size_filtered = df_portfolio_orders[df_portfolio_orders.index >= reference_date].values
portfolio = vbt.Portfolio.from_orders(close = df_close_filtered, price = df_price_filtered, size = df_size_filtered, size_type='Amount', init_cash='autoalign', freq = 'D')
...
I'm getting the exception: raise ValueError("order.price must be finite and greater than 0")
But testing the values of df_price_filtered as follows:
mask_combinada = (df_price_filtered < 0) | (~np.isfinite(df_price_filtered))
linhas_com_issues = df_price_filtered[mask_combinada.any(axis=1)]
if not linhas_com_issues.empty:
print("\nLines with values less than 0 or not finite:")
print(linhas_com_issues)
else:
print("\nNo line contains values less than 0 or not finite.")
I'm getting the answer: No line contains values less than 0 or not finite.
Python: 3.11.9
vectorbt: 0.26.2
The text was updated successfully, but these errors were encountered: