Ejemplo n.º 1
0
    def __init__(self):
        from marketsim.gen._out._side import Side
        from marketsim.gen._out._observable import ObservableSide
        from marketsim import rtti
        ObservableSide.__init__(self)

        rtti.check_fields(self)
        _Buy_Impl.__init__(self)
 def __init__(self):
     from marketsim.gen._out._side import Side
     from marketsim.gen._out._observable import ObservableSide
     from marketsim import rtti
     ObservableSide.__init__(self)
     
     rtti.check_fields(self)
     _None_Impl.__init__(self)
Ejemplo n.º 3
0
 def __init__(self, signal=None, threshold=None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.signal = signal if signal is not None else _constant_Float(0.0)
     self.threshold = threshold if threshold is not None else 0.7
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 4
0
 def __init__(self, alpha = None, book = None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out.orderbook._oftrader import OfTrader_IAccount as _orderbook_OfTrader_IAccount
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.alpha = alpha if alpha is not None else 0.015
     self.book = book if book is not None else _orderbook_OfTrader_IAccount()
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 5
0
 def __init__(self, fv = None, book = None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out.orderbook._oftrader import OfTrader_IAccount as _orderbook_OfTrader_IAccount
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.fv = fv if fv is not None else _constant_Float(200.0)
     self.book = book if book is not None else _orderbook_OfTrader_IAccount()
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 6
0
 def __init__(self, alpha=None, book=None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out.orderbook._oftrader import OfTrader_IAccount as _orderbook_OfTrader_IAccount
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.alpha = alpha if alpha is not None else 0.015
     self.book = book if book is not None else _orderbook_OfTrader_IAccount(
     )
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 7
0
 def __init__(self, bookToDependOn = None, factor = None, book = None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out.orderbook._oftrader import OfTrader_IAccount as _orderbook_OfTrader_IAccount
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.bookToDependOn = bookToDependOn if bookToDependOn is not None else _orderbook_OfTrader_IAccount()
     self.factor = factor if factor is not None else 1.0
     self.book = book if book is not None else _orderbook_OfTrader_IAccount()
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 8
0
 def __init__(self, fv=None, book=None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out.orderbook._oftrader import OfTrader_IAccount as _orderbook_OfTrader_IAccount
     from marketsim.gen._out._constant import constant_Float as _constant_Float
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.fv = fv if fv is not None else _constant_Float(200.0)
     self.book = book if book is not None else _orderbook_OfTrader_IAccount(
     )
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 9
0
    def __init__(self, cond=None, ifpart=None, elsepart=None):
        from marketsim.gen._out.side._buy import Buy_ as _side_Buy_
        from marketsim import rtti
        from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
        from marketsim.gen._out._side import Side
        from marketsim.gen._out._true import true_ as _true_
        from marketsim.gen._out._observable import ObservableSide
        ObservableSide.__init__(self)
        self.cond = cond if cond is not None else _true_()

        self.ifpart = ifpart if ifpart is not None else _side_Sell_()

        self.elsepart = elsepart if elsepart is not None else _side_Buy_()

        rtti.check_fields(self)
        _Condition_Impl.__init__(self)
Ejemplo n.º 10
0
 def __init__(self, bookToDependOn=None, factor=None, book=None):
     from marketsim import _
     from marketsim import rtti
     from marketsim.gen._out.orderbook._oftrader import OfTrader_IAccount as _orderbook_OfTrader_IAccount
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.bookToDependOn = bookToDependOn if bookToDependOn is not None else _orderbook_OfTrader_IAccount(
     )
     self.factor = factor if factor is not None else 1.0
     self.book = book if book is not None else _orderbook_OfTrader_IAccount(
     )
     rtti.check_fields(self)
     self.impl = self.getImpl()
     event.subscribe(self.impl, _(self).fire, self)
Ejemplo n.º 11
0
 def __init__(self, cond = None, ifpart = None, elsepart = None):
     from marketsim.gen._out.side._buy import Buy_ as _side_Buy_
     from marketsim import rtti
     from marketsim.gen._out.side._sell import Sell_ as _side_Sell_
     from marketsim.gen._out._side import Side
     from marketsim.gen._out._true import true_ as _true_
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.cond = cond if cond is not None else _true_()
     
     self.ifpart = ifpart if ifpart is not None else _side_Sell_()
     
     self.elsepart = elsepart if elsepart is not None else _side_Buy_()
     
     rtti.check_fields(self)
     _Condition_Impl.__init__(self)
Ejemplo n.º 12
0
 def __init__(self, cond = None, ifpart = None, elsepart = None):
     from marketsim import rtti
     from marketsim.gen._out.side._observablesell import observableSell_ as _side_observableSell_
     from marketsim.gen._out._observabletrue import observableTrue_ as _observableTrue_
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out.side._observablebuy import observableBuy_ as _side_observableBuy_
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.cond = cond if cond is not None else _observableTrue_()
     event.subscribe(self.cond, self.fire, self)
     self.ifpart = ifpart if ifpart is not None else _side_observableSell_()
     event.subscribe(self.ifpart, self.fire, self)
     self.elsepart = elsepart if elsepart is not None else _side_observableBuy_()
     event.subscribe(self.elsepart, self.fire, self)
     rtti.check_fields(self)
     _Condition_Impl.__init__(self)
Ejemplo n.º 13
0
 def __init__(self, cond=None, ifpart=None, elsepart=None):
     from marketsim import rtti
     from marketsim.gen._out.side._observablesell import observableSell_ as _side_observableSell_
     from marketsim.gen._out._observabletrue import observableTrue_ as _observableTrue_
     from marketsim.gen._out._side import Side
     from marketsim import event
     from marketsim.gen._out.side._observablebuy import observableBuy_ as _side_observableBuy_
     from marketsim.gen._out._observable import ObservableSide
     ObservableSide.__init__(self)
     self.cond = cond if cond is not None else _observableTrue_()
     event.subscribe(self.cond, self.fire, self)
     self.ifpart = ifpart if ifpart is not None else _side_observableSell_()
     event.subscribe(self.ifpart, self.fire, self)
     self.elsepart = elsepart if elsepart is not None else _side_observableBuy_(
     )
     event.subscribe(self.elsepart, self.fire, self)
     rtti.check_fields(self)
     _Condition_Impl.__init__(self)