Q26 ALPHA-TRADING SYSTEM
|
Public Member Functions | |
def | spreadModel (self, model="constant", apply="bid", parameters={"spread" :0.0001}) |
Description : More... | |
This class contains functions used by PRICE module object
def spreadModel | ( | self, | |
model = "constant" , |
|||
apply = "bid" , |
|||
parameters = {"spread" : 0.0001} |
|||
) |
Description :
Modify ask and bid prices of a PRICE object according a provided spread model.
Parameters :
- model [str] = "constant" : To every available model is associated a parameters dictionnary. The different available spread models are : - "constant" : Consists in a constant widening of the prices. In this case : parameters = {"spread" [double] : spread value} - apply [str] = "bid" : - "bid" -> the spread value is substracted from the bid values - "ask" -> the spread value is added to the ask values - "both" -> the spread value is 50% substracted from the bid values and 50% added to the ask values. - parameters [dict] = None : See model parameter description.
Returns :
None