Lean  $LEAN_TAG$
QuantConnect.Algorithm.Framework.Portfolio.SignalExports.CrunchDAOSignalExport Class Reference

Exports signals of the desired positions to CrunchDAO API. Accepts signals in percentage i.e ticker:"SPY", date: "2020-10-04", signal:0.54 More...

Inheritance diagram for QuantConnect.Algorithm.Framework.Portfolio.SignalExports.CrunchDAOSignalExport:
[legend]

Public Member Functions

 CrunchDAOSignalExport (string apiKey, string model, string submissionName="", string comment="")
 CrunchDAOSignalExport constructor. It obtains the required information for CrunchDAO API requests. See (https://colab.research.google.com/drive/1YW1xtHrIZ8ZHW69JvNANWowmxPcnkNu0?authuser=1#scrollTo=aPyWNxtuDc-X) More...
 
override bool Send (SignalExportTargetParameters parameters)
 Verifies every holding is a stock, creates a message with the desired positions using the expected CrunchDAO API format, verifies there is an open round and then sends the positions with the other required body features. If another signal was submitted before, it deletes the last signal and sends the new one More...
 
- Public Member Functions inherited from QuantConnect.Algorithm.Framework.Portfolio.SignalExports.BaseSignalExport
void Dispose ()
 If created, dispose of HttpClient we used for the requests to the different 3rd party API's More...
 

Protected Member Functions

bool ConvertToCSVFormat (SignalExportTargetParameters parameters, out string positions)
 Converts the list of holdings into a CSV format string More...
 

Protected Attributes

override HashSet< SecurityTypeAllowedSecurityTypes => _allowedSecurityTypes
 HashSet property of allowed SecurityTypes for CrunchDAO More...
 
- Protected Attributes inherited from QuantConnect.Algorithm.Framework.Portfolio.SignalExports.BaseSignalExport
HttpClient HttpClient => _lazyClient.Value
 Property to access a HttpClient More...
 

Properties

override string Name = "CrunchDAO" [get]
 The name of this signal export More...
 
- Properties inherited from QuantConnect.Algorithm.Framework.Portfolio.SignalExports.BaseSignalExport
abstract string Name [get]
 The name of this signal export More...
 
virtual HashSet< SecurityTypeAllowedSecurityTypes [get]
 Default hashset of allowed Security types More...
 

Detailed Description

Exports signals of the desired positions to CrunchDAO API. Accepts signals in percentage i.e ticker:"SPY", date: "2020-10-04", signal:0.54

Definition at line 29 of file CrunchDAOSignalExport.cs.

Constructor & Destructor Documentation

◆ CrunchDAOSignalExport()

QuantConnect.Algorithm.Framework.Portfolio.SignalExports.CrunchDAOSignalExport.CrunchDAOSignalExport ( string  apiKey,
string  model,
string  submissionName = "",
string  comment = "" 
)

CrunchDAOSignalExport constructor. It obtains the required information for CrunchDAO API requests. See (https://colab.research.google.com/drive/1YW1xtHrIZ8ZHW69JvNANWowmxPcnkNu0?authuser=1#scrollTo=aPyWNxtuDc-X)

Parameters
apiKeyAPI key provided by CrunchDAO
modelModel ID or Name
submissionNameSubmission Name (Optional)
commentComment (Optional)

Definition at line 87 of file CrunchDAOSignalExport.cs.

Member Function Documentation

◆ Send()

override bool QuantConnect.Algorithm.Framework.Portfolio.SignalExports.CrunchDAOSignalExport.Send ( SignalExportTargetParameters  parameters)
virtual

Verifies every holding is a stock, creates a message with the desired positions using the expected CrunchDAO API format, verifies there is an open round and then sends the positions with the other required body features. If another signal was submitted before, it deletes the last signal and sends the new one

Parameters
parametersA list of holdings from the portfolio, expected to be sent to CrunchDAO API and the algorithm being ran
Returns
True if the positions were sent to CrunchDAO succesfully and errors were returned, false otherwise

Reimplemented from QuantConnect.Algorithm.Framework.Portfolio.SignalExports.BaseSignalExport.

Definition at line 104 of file CrunchDAOSignalExport.cs.

Here is the call graph for this function:

◆ ConvertToCSVFormat()

bool QuantConnect.Algorithm.Framework.Portfolio.SignalExports.CrunchDAOSignalExport.ConvertToCSVFormat ( SignalExportTargetParameters  parameters,
out string  positions 
)
protected

Converts the list of holdings into a CSV format string

Parameters
parametersA list of holdings from the portfolio, expected to be sent to CrunchDAO API and the algorithm being ran
positionsA CSV format string of the given holdings with the required features(ticker, date, signal)
Returns
True if a string message with the positions could be obtained, false otherwise

Definition at line 141 of file CrunchDAOSignalExport.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ AllowedSecurityTypes

override HashSet<SecurityType> QuantConnect.Algorithm.Framework.Portfolio.SignalExports.CrunchDAOSignalExport.AllowedSecurityTypes => _allowedSecurityTypes
protected

HashSet property of allowed SecurityTypes for CrunchDAO

Definition at line 77 of file CrunchDAOSignalExport.cs.

Property Documentation

◆ Name

override string QuantConnect.Algorithm.Framework.Portfolio.SignalExports.CrunchDAOSignalExport.Name = "CrunchDAO"
getprotected

The name of this signal export

Definition at line 72 of file CrunchDAOSignalExport.cs.


The documentation for this class was generated from the following file: