简体   繁体   English

使用Quantstrat进行投资组合优化

[英]Portfolio optimization using quantstrat

I would like to backtest a portfolio of assets whose weights are mean-variance optimized. 我想对权重经过均方差优化的资产组合进行回测。

I have seem examples here and here but all the examples are either dealing with fixed orderSize/tradeSize or flexible ordersize which is computed for 1 underlying asset only. 我在这里这里似乎都有示例,但是所有示例都处理固定的orderSize / tradeSize或仅针对1个基础资产计算的灵活的ordersize。 However, mean-variance algorithm compute weights for a basket of assets (allocation for any assets should depends on its relation with other assets) 但是,均值方差算法会计算一篮子资产的权重(任何资产的分配应取决于其与其他资产的关系)

My understanding is that the osFUN parameter in the add.rule function returns order size for a particular symbol. 我的理解是add.rule函数中的osFUN参数返回特定add.rule订单大小。 Can it return a series of weights for all symbols? 它可以为所有符号返回一系列权重吗? If so, how should 'osFUN' be structured? 如果是这样,“ osFUN”应如何构成? In a addition, will osFUN be called for every symbol on every trade date or be called only once for the portfolio overall? 另外,在每osFUN为每个交易osFUN调用osFUN还是为整个投资组合仅调用一次?

Any other open-source software which can tackle this issue is welcome! 欢迎使用其他任何可以解决此问题的开源软件!

Thanks for helping! 感谢您的帮助!

我从QuantStrata博主那里得到了一个答案:“因为quantstrat不适用于此。Quantstrat旨在测试单个仪器上的信号过程。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM