quantstrat | quantstrat provides a generic infrastructure
kandi X-RAY | quantstrat Summary
kandi X-RAY | quantstrat Summary
quantstrat provides a generic infrastructure to model and backtest signal-based quantitative strategies. It is a high-level abstraction layer (built on xts, FinancialInstrument, blotter, etc.) that allows you to build and test strategies in very few lines of code. quantstrat is still under heavy development but is being used every day on real portfolios. We encourage you to send contributions and test cases via the appropriate GitHub mediums (Pull requests and Issue tracker).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of quantstrat
quantstrat Key Features
quantstrat Examples and Code Snippets
Community Discussions
Trending Discussions on quantstrat
QUESTION
I am trying put a stoplimit order to close my position when a specific order price crosses above or below the Close of the candle.
My rule function as follows:
...ANSWER
Answered 2022-Feb-06 at 07:06You need to make one more modification in rules.R (on approximately lines 580-590), setting posQty
and negQty
to the close prices for the stoplimit
order type (instead of High and Low prices):
QUESTION
Question 1: I am trying to use the ATR indicator in quantstrat. I am getting error Error in try.xts(HLC, error = as.matrix) : argument "HLC" is missing, with no default
...ANSWER
Answered 2022-Jan-14 at 06:48Your arguments
list is not right for the ATR()
indicator. There is no argument named "atrx" for ATR
. Look at formals(ATR)
/ the function definition for ATR
to see the correct parameter names.
This fixes the issue:
QUESTION
I have 2 symbols in my backtest. I am adding indicator donchianchannel. However when i plot it, add_TA( mktdata$high.DCH, col = 6, lwd = 1.5,on=TRUE) does not pass the associated symbol's data and i end up getting the same data plotted for both the symbols.
...ANSWER
Answered 2022-Jan-12 at 02:00Try this instead, at the end of your example :
QUESTION
I am really despairing of this problem and I haven't found any solution. If i remove the last call to add.indicator applyIndicators and thus the backtest will function, but this way I always run in the runSum error message.
Someone with an idea?
...ANSWER
Answered 2020-Jul-26 at 19:40The error indicates your x variable is multivariate. If you run head(x)
you will see the series'
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install quantstrat
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page