Commit Graph

34 Commits

Author SHA1 Message Date
Martin Molinero 95af5f8877 SecurityHolding has a ref to an ICurrencyConverter
- `SecurityHolding` will now have a reference to a `ICurrencyConverter`
instance, provided as a constructor argument, called by the owning `Security`.
2018-12-04 17:06:56 -03:00
Michael Handschuh 20133d40d1 Add ICurrencyConverter to Security constructors
Security instances will require private access to this value in order to
compute close profit.

NOTE: The extent of these changes for simply adding a constructor argument
insinuates that we're missing an abstraction to manage the construction of
these objects, such as a factor object for Security. This will need some
careful TLC in the near future.
2018-10-10 11:17:12 -04:00
Michael Handschuh f08184c0ae Revert class name changes from #1506
This caused several user algorithms to break. Also, its still correct to
call these margin models.
2018-02-04 14:20:38 -05:00
Stefano Raggi baced83ac4 Rename interface ISecurityMarginModel to IBuyingPowerModel
Also renamed all existing margin models to buying power models:
- SecurityMarginModel -> SecurityMarginBuyingPowerModel
- FutureMarginModel -> FutureMarginBuyingPowerModel
- OptionMarginModel -> OptionMarginBuyingPowerModel
2018-01-31 11:47:34 +01:00
Andrew Hart 8ebbb7e385 SpreadSlippageModel removed and replaced with ConstantSlippageModel 2016-11-22 14:04:44 -05:00
AlexCatarino 82d81108ad Implements price variation models
Implements IPriceVariationModel interface which takes the security object and returns a decimal variation
Implemets SecurityVariationModel class: default implementation of IPriceVariationModel that returns a fixed value (read from symbol-properties-database) for decimal variation
Implemets EquityVariationModel class: implementaion of IPriceVariationModel that returns a decimal variation as a function of equity price
Implemets AdjustedPriceVariationModel class: implementaion of IPriceVariationModel that returns zero
Adds unit test
2016-09-20 15:36:04 -03:00
AlexCatarino 96eab852c2 Renames PipSize to MinimumPriceVariation
Renames SymbolProperties.PipSize to SymbolProperties.MinimumPriceVariation, since the term pip does not refer to a minimum price variation.
Adds MinimumPriceVariation and LotSize for Oanda Forex symbols in symbol-properties-database.
2016-09-15 11:02:51 -03:00
Michael Handschuh e933306ed1 Allow constructing Security without subscription config 2016-04-14 17:28:54 -04:00
Michael Handschuh a6c42a9b77 Add ctors that don't require a subscription 2016-04-13 21:39:15 -04:00
Michael Handschuh f73b8cf611 Adds IVolatilityModel and Security.VolatilityModel
Added indicator based implementation
Added relative standard deviation non-indicator implementation
2016-04-06 14:45:15 -04:00
Michael Handschuh a073bb6d17 Remove empty cfd/equity/forex portfolio models 2016-02-16 13:26:09 -05:00
Michael Handschuh cc888cda1e Remove empty cfd/equity/forex margin models 2016-02-16 13:26:09 -05:00
Michael Handschuh 204601224c Implement common SecurityMarginModel.ProcessFill
This method is now able to handle all current security types.
2016-02-16 13:26:07 -05:00
Michael Handschuh 6fb75150bb Remove overrides of GetMarginCallOrders 2016-02-16 13:26:07 -05:00
Michael Handschuh f1e2337e41 Remove overrides of GetInitialMarginRequiredForOrder 2016-02-16 13:26:06 -05:00
Michael Handschuh b4076c7d9f Remove unused properties/field in Cfd/Forex holdings 2016-02-16 13:26:06 -05:00
Michael Handschuh ba6f8fce1b Implement common Security.TotalCloseProfit() method 2016-02-16 13:26:05 -05:00
Michael Handschuh 23119349e5 Implement common Securty.HoldingsValue property 2016-02-16 13:26:05 -05:00
Michael Handschuh f0112b719e Implement common Security.HoldingsCost property 2016-02-16 13:26:04 -05:00
Michael Handschuh d9a9c136c2 Move quote currency validation to Security ctor 2016-02-16 13:26:03 -05:00
Michael Handschuh a6a6699b3a Removes Cfd.QuoteCurrencySymbol/Forex.QuoteCurrencySymbol 2016-02-16 13:26:03 -05:00
Michael Handschuh e892b0db6e Adds Security.SymbolProperties property 2016-02-16 13:26:02 -05:00
Michael Handschuh 38248d641e Adds symbol properties to Security ctor 2016-02-16 13:26:02 -05:00
Michael Handschuh efea1b1eca Add Security.QuoteCurrency property 2016-02-16 13:26:00 -05:00
Michael Handschuh 0042586b6a Adds quote currency to Security ctor 2016-02-16 13:26:00 -05:00
Michael Handschuh 716be38786 Fixes bad build from 7c20419 :/ 2016-02-12 11:31:52 -05:00
Michael Handschuh 7a7b77cae1 Update Order.GetValue to take a Security
Previously the get value functions were not respecting various conversion rates and contract multipliers
2016-02-04 19:56:26 -05:00
Michael Handschuh 983e5fd20b Remove redundant SecurityType Order.ctor argument 2016-02-04 17:59:35 -05:00
Stefano Raggi 52ccee0530 Adds validation checks in Cfd constructor and removes null checks from properties 2016-02-01 23:03:47 +01:00
Stefano Raggi 932b757a1b Remove Cfd.GetQuoteCurrency(Symbol) 2016-01-24 16:29:52 +01:00
Stefano Raggi 93b2d50a4e Adds SymbolProperties argument to Cfd constructor 2016-01-24 16:02:45 +01:00
Stefano Raggi 2790ce275a Sets default values in Cfd constructor 2016-01-21 21:44:23 +01:00
Stefano Raggi 73b38efdb8 Adds tests for Cfd class 2016-01-21 21:10:05 +01:00
Stefano Raggi a71c9f0e92 Adds new CFD classes 2016-01-20 21:50:50 +01:00