API Reference for docs v2 (#6098)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled

API Reference for docs v2 

Co-authored-by: Alexandre Catarino <AlexCatarino@users.noreply.github.com>
This commit is contained in:
Louis Szeto
2021-12-09 08:25:36 +08:00
committed by GitHub
parent 72105539fc
commit 8ca9258e70
9 changed files with 605 additions and 15 deletions
+16 -2
View File
@@ -1,4 +1,4 @@
/*
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
@@ -28,6 +28,7 @@ namespace QuantConnect.Algorithm
/// Sets the alpha model
/// </summary>
/// <param name="alpha">Model that generates alpha</param>
[DocumentationAttribute(AlgorithmFramework)]
public void SetAlpha(PyObject alpha)
{
IAlphaModel model;
@@ -45,6 +46,7 @@ namespace QuantConnect.Algorithm
/// Adds a new alpha model
/// </summary>
/// <param name="alpha">Model that generates alpha to add</param>
[DocumentationAttribute(AlgorithmFramework)]
public void AddAlpha(PyObject alpha)
{
IAlphaModel model;
@@ -62,6 +64,8 @@ namespace QuantConnect.Algorithm
/// Sets the execution model
/// </summary>
/// <param name="execution">Model defining how to execute trades to reach a portfolio target</param>
[DocumentationAttribute(AlgorithmFramework)]
[DocumentationAttribute(TradingAndOrders)]
public void SetExecution(PyObject execution)
{
IExecutionModel model;
@@ -79,6 +83,8 @@ namespace QuantConnect.Algorithm
/// Sets the portfolio construction model
/// </summary>
/// <param name="portfolioConstruction">Model defining how to build a portfolio from alphas</param>
[DocumentationAttribute(AlgorithmFramework)]
[DocumentationAttribute(TradingAndOrders)]
public void SetPortfolioConstruction(PyObject portfolioConstruction)
{
IPortfolioConstructionModel model;
@@ -96,6 +102,8 @@ namespace QuantConnect.Algorithm
/// Sets the universe selection model
/// </summary>
/// <param name="universeSelection">Model defining universes for the algorithm</param>
[DocumentationAttribute(AlgorithmFramework)]
[DocumentationAttribute(Universes)]
public void SetUniverseSelection(PyObject universeSelection)
{
IUniverseSelectionModel model;
@@ -110,6 +118,8 @@ namespace QuantConnect.Algorithm
/// Adds a new universe selection model
/// </summary>
/// <param name="universeSelection">Model defining universes for the algorithm to add</param>
[DocumentationAttribute(AlgorithmFramework)]
[DocumentationAttribute(Universes)]
public void AddUniverseSelection(PyObject universeSelection)
{
IUniverseSelectionModel model;
@@ -124,6 +134,8 @@ namespace QuantConnect.Algorithm
/// Sets the risk management model
/// </summary>
/// <param name="riskManagement">Model defining how risk is managed</param>
[DocumentationAttribute(AlgorithmFramework)]
[DocumentationAttribute(TradingAndOrders)]
public void SetRiskManagement(PyObject riskManagement)
{
IRiskManagementModel model;
@@ -141,6 +153,8 @@ namespace QuantConnect.Algorithm
/// Adds a new risk management model
/// </summary>
/// <param name="riskManagement">Model defining how risk is managed to add</param>
[DocumentationAttribute(AlgorithmFramework)]
[DocumentationAttribute(TradingAndOrders)]
public void AddRiskManagement(PyObject riskManagement)
{
IRiskManagementModel model;
@@ -151,4 +165,4 @@ namespace QuantConnect.Algorithm
AddRiskManagement(model);
}
}
}
}