LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
In the CSV output from running a trade backtest, is it possible emit data that is more friendly if imported into a spreadsheet?
- Time appears to be Zulu (Greenwich Mean) but Excel doesn't seem to recognize and convert to local time.
- The option symbol is useful - but if you can additionally emit the strike, expiration, etc. that would save time having to look it up (or write a program to do so) and focus more on whether or not the backtest code is doing what it should.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Alexandre Catarino
,
Thank you for your suggestions. Status column is OrderStatus:
// Order invalidated before it hit the market
//(e.g. insufficient capital)..
Invalid = 7,
CancelPending = 8
}
0
Richard Hale Shaw
139
,
Excellent. Thanks, Alexandre.
Do the libraries have any lookup functions that can take an option code and return its identifying components (strike, expiration, etc)?
0
Alexandre Catarino
,
The options code follows the OSI terminology. In Lean, this code is written by the SymbolRepresentation.GenerateOptionTickerOSI method. Once we get issued to it, we don't need a decoder:
SPY 160219P00201500
SPY: underlying
160219: Expire date (yyMMdd)
P: Put Option
00201500: Strike (in $ multiplied by 1000)
0
Richard Hale Shaw
139
,
Ok. I think what I was looking for is to take the OSI code and generate the components - but the method right below GenerateOptionTickerOSI, ParseOptionTickerIQFeed, seems to do just what I need.
So you feed the code to latter and you get back an OptionTickerProperties that's filled out with these, no?
0
Alexandre Catarino
,
Unfortunatelly, no. That method parses the IQFeed Options Symbology that is different from the OSI terminology we use in the CVS output. It looks like the old-school symbology that uses letters to represent expire dates. Here is the Wikipedia article that discuss it: Option naming convention.
0
Richard Hale Shaw
139
,
Got it.
So *is there* a method that parses the OSI code into its components?
0
Alexandre Catarino
,
Unfortunatelly, there is not. However, if we were to implement it, it could look like this:
private Symbol ParseOptionCode(string codeStr)
{
var code = codeStr.Split(' ');
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Loading...
To unlock posting to the community forums please complete at least 30% of Boot Camp. You can
continue your Boot Camp training progress from the terminal. We
hope to see you in the community soon!