سؤال

I'm working on a rotational strategy using blotter. The architecture of it is sort of one account, 8 portfolios, 100 markets. The code looks for markets getting stronger, looks in the portfolio for holdings getting weaker, sells the weak, buys the strong. It's all been done before.

My question about blotter is that I understand and use the initPortf function which requires (as I use it anyway) a list of stocks which show up in .blotter$portfolio.NAME$symbols. However, what does one do if they discover a market to trade after the portfolio has been initialized? How does one properly increase the list of markets? I would have thought maybe there would be an 'addStock' command that paralleled the addTxn command but I'm not finding it.

If it doesn't exist then that's OK. I can initialize the portfolio with (conceptually) every symbol I might ever trade, but that seems a bit of a hack?

Are there any other ways to handle this?

Thanks

هل كانت مفيدة؟

المحلول

After looking a bit more at this I still haven't found an actual way to add a stock but there doesn't seem to be any issue with putting a very large of stocks into the list of potential positions so that's what I ended up doing here.

Still interested in whether I missed some better way to do this but not having any problems here.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top