Replies: 1 comment 2 replies
-
|
There shouldn't be an issue. import vectorbt as vbt
import pandas as pd
vbt.Portfolio.from_orders(
close=pd.Series([1, 2, 3]),
size=pd.DataFrame({'a': [1, 1, 1], 'b': [2, 2, 2]}),
size_type='targetamount',
freq='D',
direction='all'
)
<vectorbt.portfolio.base.Portfolio at 0x7fafe006c5f8>Can you print |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the
vbt.Portfolio.from_ordersmethod and I'm using as parameters acloseof shape(1457,)and typepd.Series, and asizeof shape(1457,40)and typepd.DataFrame.I thought it might be similar to
closeandentries/exitsfrom.from_signals()method, but it tells me -Is there meant to be broadcasting functionality between
closeandsize?Beta Was this translation helpful? Give feedback.
All reactions