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
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.
Warren Harding
58.2k Pro
,
Hmmm. Looks like I might be able to inherit from Quandl and override the GetSource function to hack in a change to the url. If anyone knows a proven way I'm all ears.
0
SLPAdvisory
851 Pro
,
namespace QuantConnect
{
public class BasicTemplateAlgorithm : QCAlgorithm
{
public string[] Symbols = {"FLOT","PFTPX","OOSYX","LSFYX","LFRFX"};
public override void Initialize()
{
SetStartDate(2010, 01, 01);
SetEndDate(DateTime.Now);
SetCash(10000000);
foreach (var symbol in Symbols)
{
AddData<Custom>(symbol, Resolution.Daily);
Securities[symbol].FeeModel = new ConstantFeeTransactionModel(25);
}
}
public void OnData(Custom data)
{
foreach (var symbol in Symbols)
{
if (!Portfolio[symbol].IsLong)
{
Order(symbol, 1);
}
}
}
}
public class Custom : BaseData
{
public decimal Open;
public decimal High;
public decimal Low;
public decimal Close;
public Custom()
{
}
public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
{
return new SubscriptionDataSource("https://api.tiingo.com/tiingo/daily/"+config.Symbol+"/prices?startDate=2000-1-1&endDate=2018-6-15&format=csv&token=myapikey", SubscriptionTransportMedium.RemoteFile);
}
public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLive)
{
var index = new Custom();
Here is what I've been using to access different mutual funds data from an API, this might work for you?
0
Warren Harding
58.2k Pro
,
Ya, that looks similar to what I'm going to attempt. Thanks!
1
Jared Broad
Pro
,
Will // Warren -- you should also set the period for custom data so you get it at the right time.
In this case Period = TimeSpan.FromDays(1)
Otherwise its point data and Time = EndTime
0
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.
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!