Lean  $LEAN_TAG$
QuantConnect.Benchmarks.SecurityBenchmark Class Reference

Creates a benchmark defined by the closing price of a Security instance More...

Inheritance diagram for QuantConnect.Benchmarks.SecurityBenchmark:
[legend]

Public Member Functions

 SecurityBenchmark (Security security)
 Initializes a new instance of the SecurityBenchmark class More...
 
decimal Evaluate (DateTime time)
 Evaluates this benchmark at the specified time in units of the account's currency. More...
 

Static Public Member Functions

static SecurityBenchmark CreateInstance (SecurityManager securities, Symbol symbol)
 Helper function that will create a security with the given SecurityManager for a specific symbol and then create a SecurityBenchmark for it More...
 

Properties

Security Security [get]
 The benchmark security More...
 

Detailed Description

Creates a benchmark defined by the closing price of a Security instance

Definition at line 26 of file SecurityBenchmark.cs.

Constructor & Destructor Documentation

◆ SecurityBenchmark()

QuantConnect.Benchmarks.SecurityBenchmark.SecurityBenchmark ( Security  security)

Initializes a new instance of the SecurityBenchmark class

Definition at line 36 of file SecurityBenchmark.cs.

Here is the caller graph for this function:

Member Function Documentation

◆ Evaluate()

decimal QuantConnect.Benchmarks.SecurityBenchmark.Evaluate ( DateTime  time)

Evaluates this benchmark at the specified time in units of the account's currency.

Parameters
timeThe time to evaluate the benchmark at
Returns
The value of the benchmark at the specified time in units of the account's currency.

Implements QuantConnect.Benchmarks.IBenchmark.

Definition at line 47 of file SecurityBenchmark.cs.

◆ CreateInstance()

static SecurityBenchmark QuantConnect.Benchmarks.SecurityBenchmark.CreateInstance ( SecurityManager  securities,
Symbol  symbol 
)
static

Helper function that will create a security with the given SecurityManager for a specific symbol and then create a SecurityBenchmark for it

Parameters
securitiesSecurityService to create the security
symbolThe symbol to create a security benchmark with
Returns
The new SecurityBenchmark

Definition at line 59 of file SecurityBenchmark.cs.

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

Property Documentation

◆ Security

Security QuantConnect.Benchmarks.SecurityBenchmark.Security
get

The benchmark security

Definition at line 31 of file SecurityBenchmark.cs.


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