def __init__(self):
        '''Initializes a new instance of the VolumeWeightedAveragePriceExecutionModel class'''
        self.targetsCollection = PortfolioTargetCollection()
        self.symbolData = {}

        # Gets or sets the maximum order quantity as a percentage of the current bar's volume.
        # This defaults to 0.01m = 1%. For example, if the current bar's volume is 100,
        # then the maximum order size would equal 1 share.
        self.MaximumOrderQuantityPercentVolume = 0.01
Beispiel #2
0
    def __init__(self, maximumSectorExposure = 0.20):
        '''Initializes a new instance of the MaximumSectorExposureRiskManagementModel class
        Args:
            maximumDrawdownPercent: The maximum exposure for any sector, defaults to 20% sector exposure.'''
        if maximumSectorExposure <= 0:
            raise ValueError('MaximumSectorExposureRiskManagementModel: the maximum sector exposure cannot be a non-positive value.')

        self.maximumSectorExposure = maximumSectorExposure
        self.targetsCollection = PortfolioTargetCollection()
Beispiel #3
0
    def __init__(self, period=60, deviations=2, resolution=Resolution.Minute):
        '''Initializes a new instance of the StandardDeviationExecutionModel class
        Args:
            period: Period of the standard deviation indicator
            deviations: The number of deviations away from the mean before submitting an order
            resolution: The resolution of the STD and SMA indicators'''
        self.period = period
        self.deviations = deviations
        self.resolution = resolution
        self.targetsCollection = PortfolioTargetCollection()
        self.symbolData = {}

        # Gets or sets the maximum order value in units of the account currency.
        # This defaults to $20,000. For example, if purchasing a stock with a price
        # of $100, then the maximum order size would be 200 shares.
        self.MaximumOrderValue = 20000
 def __init__(self, maximumSectorExposure=0.20):
     '''Initializes a new instance of the MaximumSectorExposureRiskManagementModel class
     Args:
         maximumDrawdownPercent: The maximum exposure for any sector, defaults to 20% sector exposure.'''
     self.maximumSectorExposure = abs(maximumSectorExposure)
     self.targetsCollection = PortfolioTargetCollection()
 def __init__(self):
     '''Initializes a new instance of the ImmediateExecutionModel class'''
     self.targetsCollection = PortfolioTargetCollection()