Git Product home page Git Product logo

documentation's Introduction

QuantConnect Logo

QuantConnect Documentation

This repository is the primary source for documentation for QuantConnect.com. If you have edits to the documentation, please submit a pull request for the fix.

Contributors of accepted pull requests will receive a 2 month free Prime subscription on QuantConnect. Once your pull request has been merged, write to us at [email protected] with a link to your PR to claim your free live trading! =) QuantConnect <3 open source.

Lean Engine is an open source fully-managed C# algorithmic trading engine built for desktop and cloud usage. It was designed in Mono and operates on Windows, Linux, and Mac platforms. For more information about the LEAN Algorithmic Trading engine, see the Lean Engine Repository.

New Documentation Requests and Edits

Please submit new documentation requests as an issue to the Documentation repository. Before submitting an issue, please read others to ensure it is not a duplicate. Edits and fixes for clarity are warmly welcomed!

Contributors and Pull Requests

Contributions are very warmly welcomed, but we ask you read the existing code to see how it is formatted and commented, and to ensure contributions match the existing style. All code submissions must include accompanying tests. Please see the contributor guidelines.

documentation's People

Contributors

alexcatarino avatar alinxlin avatar ashutoshrana171 avatar brisb avatar derekmelchin avatar gaviles avatar ggoziker avatar gsalaz98 avatar gurusawhney avatar haxdds avatar hsm207 avatar jaredbroad avatar jingwu74 avatar jmerle avatar leighamspringer-sutton avatar linkliang avatar lixiang618 avatar logkirk avatar louisszeto avatar marinovsky avatar marrri4ka avatar martin-molinero avatar mazaart avatar oussamanahdi avatar qilongchan avatar romazes avatar shilewenuw avatar simonsonjack avatar technoconserve avatar xinweimetrics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

documentation's Issues

Clarification date order custom data

I had some problems importing my custom data using a CSV and SubscriptionTransportMedium.RemoteFile. I finally got it working by making sure the rows in the csv file was in chronological date order. I did not find anything in the docs stating this. Is this the case or did I misunderstand something?

New code example backtest showing how to prevent the future from ever being known

The default on QuantConnect is for the future to be injected into backtesting. Adjusted prices. Sounds nice. And is devastating.

This is a request for a new example backtest to be posted in documentation, one that will show users a complete solution on how to insure the future does not (cannot) influence backtesting. Such an example should benefit QuantConnect, it should greatly improve chances of success for both business and users.

Please see https://www.quantconnect.com/forum/discussion/3806/security-object-shows-067-history-shows-12/p1

Handling data - checking for contents of `Slice data` object.

Hi,

Seeing more and more posts on the forums where people are getting errors because they are trying to access parts of the data object that do not exist.

The section on Handling Data contains a lot of examples, but only some of them perform any content checking. They should be upgraded to do so.

Insufficient buying power with SetHoldings

Why do I get Backtest Handled Error: Order Error: id: XXX, Insufficient buying power to complete order" using SetHoldings() method call?

Most cases are Daily data close price -> open price has different value, making the order fail because the price moved.

The answer is to give your algorithm a larger cash buffer and/or switch to a higher res data.

Adds Documentation for AlgorithmSettings

Adds documentation for IAlgorithm.AlgorithmSettings:

AlgorirthmSettings class includes user settings for the algorithm which can be changed in the IAlgorithm.Initialize method.

public override void Initialize()
{
    AlgorirthmSettings.LiquidateEnabled = false;    // Liquidate method cannot be used "safety measure" 
}

Orders show Int Quantity

MarketOrder(Symbol symbol, int quantity, bool asynchronous = false, string tag = "")Asynchronous flag can be used to send the many orders and not wait for the fill response.

Errorhandling chapter

Because there is no debugger there should be at least a part in the documentation that describes how to open the stacktrace and to help yourself.
I dont have taken much time to analyze this problem but i think the wrong class was returned for coarse selection. The user doesnt know how to open the console and even if he opens it, it does not look like he could open the stacktrace with clicking on it.
Searching the nice docu for stacktrace shows many chapters to read:
grafik
but there is nothing to find:
grafik

:(:(:(:(:(

please add a chapter against depression and alcohol

https://www.quantconnect.com/forum/discussion/2756/coarse-selection-function

Inside of the errorhandling chapter there should be also described how to add marks with Logs.
I don't know if it is possible to show which methods python enters to show how far it gets but a user can add self.Log(1) to check if it enters fine selection and coarse selection. This showed me that it died already in coare selection. (stacktrace showed only c# casting error)

Adds Algorithms Example Using `aesara` (Python)

Expected Behavior

Have an example of how to use theano package and AForge.Neuro in an algorithm.

Actual Behavior

No such example.

Potential Solution

Add example.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Common errors chapter

working with data some people are starting to write an algo but than get some errors they dont unterstand.
You have it sometimes in c# than little bit better in python.
than its sometimes missing:

if (not self._rc.IsReady) or (not data.ContainsKey(self._spy)): return
if data[self._spy] is None: return

equivalent in c#:
if (!data.ContainsKey("SPY")) return;
:(

so it depends on the algo you are looking at if you have problems or not !

that is why an common errors section is missing:
https://www.quantconnect.com/forum/discussion/3930/problem-with-launching-while-backtesting

System.NullReferenceException

even if that was not the problem it is sometimes a common problem for developers to rely on the data with holes from the data provider.

BootCamp Issue

Algorithmic Trading with Equities

Manually Selecting Data - The last paragraph mentions discussing changing leverage, requesting pre-market data and disabling fill-forward in the next task but these are not covered.

Set Data Normalization Mode - Assessing Securities gives an alternative example to using the security.SetDataNormalizationMode() method but doesn’t explain situations where this might be useful. Doesn’t really help in the bootcamp and a bit confusing as it’s not part of the task objective exercise.

The task objective asks you to use the SetLeverage method w/o providing an example of how this is done. Per the prior task believe the intent was to have a review of this method. It’s trivial to figure out SetLeverage(1)

Universe Selection sequence contains no elements

Expected Behavior

The algorithm should select ticker universe using both coarse and fine filters and return the top 80% by dollar volume (coarse filter) and then the top and bottom 10% of assets according to FCFYield, PERatio, BookValuePerShare, and PriceChange1M (fine filter).

Actual Behavior

Universe selection works as expected (log statements have returned symbols as expected) except when an error is thrown after 6/20/2018
2018-06-21 00:00:00 Runtime Error: Sequence contains no elements

Potential Solution

Uncertain. The only starting point I can think of is when the error
Data for symbol VICI has been limited due to numerical precision issues in the factor file. The starting date has been set to 6/25/2018.
is thrown.

Reproducing the Problem

See backtest at this URL: https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_7abb411400c518989448e33f5323a9e8.html

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Add CTRL + F to shortcuts

Searching is the standard tool to find variables and other stuff inside the editor.
It seems some people do not know or need shortcuts from standard tools (firefox) because they are also in the menu.
Someone would lough at me because i dont know the VIM shortcuts for going through code and regular expressions for searching and that stuff.
Please add this simple thing one day because it is missing :)

Adds Documentation on Logging Limits

Add documentation to explain to users why there is a logging limit for each backtest and a daily one. In this section, teach users that they can rely on the Debug Feature.

Morning Star

hi,
a user asked where she gets info about x.EarningReports.BasicAverageShares.ThreeMonths but there is no morning star chapter in the docu.
grafik

But the website is available and the data is there.
https://www.quantconnect.com/data#fundamentals/usa/morningstar

Could you please add the morningstar info (the full content of the website above) under RESEARCH to the newly created chapter MORNING STAR (or something like that)

link to the post:
https://www.quantconnect.com/forum/discussion/3730/question-about-the-universe

Fixes Futures Reference Table

Adds Fixes Futures reference table to show the correspondence between the QuantConnect.Securities.Futures helpers and the tickers. It should only include supported data (see Data Explorer).

Missing QuoteBar in Data Formats

Documentation/02 Algorithm Reference/03 Handling Data/04 Data Formats.html

This file is missing QuoteBar as a financial data type and a drop down of its class members.

Example algorithm of splitting up a history request

Expected Behavior

Demonstration of breaking up a history request for users.

Actual Behavior

No live history request demonstrations.

Potential Solution

Add C# and Python examples of split up history requests warming up indicators.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues

Portfolio information

Please add some portfolio members or at least a link of the class members to the index(/docu).
https://www.quantconnect.com/forum/discussion/2708/get-total-cash-value

Even C# good developers are searching for this kind of informations:
https://www.quantconnect.com/forum/discussion/1351/total-equity

people are searching this since 2015 :(
https://www.quantconnect.com/forum/discussion/776/retrieving-account-equity-and-mr/p1

There is no general information in the university as well only in the orders section :(
but there is nothing to find in Securites and Portfolio

thanks

Timezone.html

Docs do not provide information on the timezone of gdax

Order and Trading

Missing infos about fees.
How to access them: orderevent & Portfolio examples.

Revise Documentation for Upgrading Classic Algorithms

Alpha Streams documentation regarding upgrading classic algorithms needs to be updated:

  • Remove references to FrameworkBridgeAlgorithms
  • Discuss Flat Insights
  • Mention why it is important to emit insights even though trades will do this already

Add documentation for extended market hours data

Needs to add a paragraph about extended market hours data in "Handling Data" section. A few points to include:

  1. Extended market hours data are available in QuantConnect. It will send in data from 4 am - 8 pm. The data can be accessed by setting extendedMarketHours to True when selecting asset data using methods like self.AddSecurity(), self.AddEquity(), etc. For instance,

# Positional arguments: ticker, resolution, market,
# fillDataForward, leverage, extendedMarketHours
self.AddEquity("AAPL", Resolution.Minute, Market.USA, True, 1, True)

  1. However, the Hourly and Daily resolution data don't support extended market hours data yet. To avoid unexpected results, extendedMarketHours = True should always be used with Minute, Second or Tick resolution data.

Fix examples in Rolling Window section

Examples in Rolling Window section throws an exception because decimal is not defined. We should use:

from decimal import Decimal
self.closeWindow = RollingWindow[Decimal](4)

Improve information on using rolling windows with indicators.

Markdown

I prefer docs offline. It would be really great if the docs were in Markdown, so they would be easy to search with grep or ripgrep.

Add brokerage models features information

Some brokerages (FXCM and Oanda) don't allow certain order types while others (GDAX) don't allow order updates. We should add that information in the docs so that users have easy access to this information.

Remove ISecurityTransactionModel references

  • ISecurityTransactionModel was removed from Lean.
  • Fee models should inherit from FeeModel
  • Fill models should inherit from FillModel
  • Buying power (AKA margin) models should inherit from BuyingPowerModel
  • IFeeModel.GetOrderFee has new parameters.

Last day in historical data request?

If I get the last seven minute resolution trade bars...

IEnumerable<TradeBar> bars = History("SPY", 14, Resolution.Minute);
List<TradeBar> list = bars.ToList();

I keep forgetting if the first or last element in the list would be the most recent TradeBar.
It would be nice if it was added to the docs page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.