Oleg Polakow

Results 285 comments of Oleg Polakow

Hi @emiliobasualdo, you need to subclass `Trades`, add your method, then subclass `Portfolio`, and overwrite `trades` property to call your new `Trades` class (see [this line](https://github.com/polakowo/vectorbt/blob/910e5f49ad013429b5d195205faa9987321cca25/vectorbt/portfolio/base.py#L2112))

Hi @thebadguyfromstarwars, it's pretty much the same as running a MA crossover example from the readme: ```python import vectorbt as vbt price = vbt.YFData.download('BTC-USD').get('Close') macd_ind = vbt.MACD.run(price) entries = macd_ind.macd_above(0)...

Date should be passed as index.

As the error says, you need to select a column via portfolio[column] or plot(column=).

Which example do you refer to? You don’t have to select a column if your portfolio 1) has only one column or 2) it’s grouped into one single group.

vbt.Portfolio.from_orders() Use portfolio.trades to analyze trade records and create custom metrics.

portfolio.orders.records_readable is a dataframe that contains all necessary information about what orders have been executed, you can then manually search this table for your stock.

As I mentioned earlier, you need to use `Portfolio.from_orders`, which is the easiest way to enter custom order info. For example, to analyze a simple trade: ```python import vectorbt as...

Trades and orders are different animals. You want to work with orders, since trades already have P&L info attached. To be specific, you need portfolio.orders.records (Everything that has “_readable” as...

`run_combs` should be used only when you want to generate multiple indicators that can be combined together. For example, MA is such an indicator, because with `r=2` you can generate...