예제 #1
0
    def __init__(self, data):
        OpenCSV.__init__(self, data)

        self.working_order_keys = [
            '', '', 'time_placed', 'spread', 'side', 'quantity',
            'pos_effect', 'symbol', 'expire_date', 'strike', 'contract',
            'price', 'order', 'tif', 'mark', 'status'
        ]

        self.filled_order_keys = [
            '', 'exec_time', 'spread', 'side', 'quantity', 'pos_effect',
            'symbol', 'expire_date', 'strike', 'contract', 'price',
            'net_price', 'order'
        ]

        self.cancelled_order_keys = [
            '', '', 'time_cancelled', 'spread', 'side', 'quantity',
            'pos_effect', 'symbol', 'expire_date', 'strike', 'contract',
            'price', 'order', 'tif', 'status'
        ]

        self.rolling_strategy_keys = [
            'position', 'new_expire_date', 'call_by', 'days_begin', 'order_price',
            'active_time', 'move_to_market_time', 'status'
        ]

        self.rolling_strategy_options = [
            'side', 'symbol', 'right', 'ex_month', 'ex_year', 'strike', 'contract'
        ]

        self.working_order = list()
        self.filled_order = list()
        self.cancelled_order = list()
        self.rolling_strategy = list()
예제 #2
0
    def __init__(self, data):
        OpenCSV.__init__(self, data)

        self.working_order_keys = [
            '', '', 'time_placed', 'spread', 'side', 'quantity', 'pos_effect',
            'symbol', 'expire_date', 'strike', 'contract', 'price', 'order',
            'tif', 'mark', 'status'
        ]

        self.filled_order_keys = [
            '', 'exec_time', 'spread', 'side', 'quantity', 'pos_effect',
            'symbol', 'expire_date', 'strike', 'contract', 'price',
            'net_price', 'order'
        ]

        self.cancelled_order_keys = [
            '', '', 'time_cancelled', 'spread', 'side', 'quantity',
            'pos_effect', 'symbol', 'expire_date', 'strike', 'contract',
            'price', 'order', 'tif', 'status'
        ]

        self.rolling_strategy_keys = [
            'position', 'new_expire_date', 'call_by', 'days_begin',
            'order_price', 'active_time', 'move_to_market_time', 'status'
        ]

        self.rolling_strategy_options = [
            'side', 'symbol', 'right', 'ex_month', 'ex_year', 'strike',
            'contract'
        ]

        self.working_order = list()
        self.filled_order = list()
        self.cancelled_order = list()
        self.rolling_strategy = list()
예제 #3
0
    def __init__(self, data):
        OpenCSV.__init__(self, data=data)

        self.equity_option_keys = [
            'name', 'quantity', 'days', 'trade_price', 'mark', 'mark_change', 'delta',
            'gamma', 'theta', 'vega', 'pct_change', 'pl_open', 'pl_day', 'bp_effect'
        ]

        self.position_summary_keys = [
            'cash_sweep', 'pl_ytd', 'bp_adjustment', 'futures_bp', 'available'
        ]

        self.option_key = [
            'right', 'special', 'ex_month', 'ex_year', 'strike', 'contract'
        ]

        self.future_position_keys = [
            'symbol', 'expire_date', 'spc', 'quantity', 'days', 'trade_price',
            'mark', 'mark_change', 'pct_change', 'pl_open', 'pl_day', 'bp_effect',
            'session'
        ]

        self.forex_position_keys = [
            'symbol', 'quantity', 'trade_price', 'mark', 'mark_change',
            'pct_change', 'pl_open', 'pl_day', 'bp_effect'
        ]

        self.equity_option_position = list()
        self.position_summary = list()
        self.future_position = list()
        self.forex_position = list()
예제 #4
0
    def __init__(self, data):
        OpenCSV.__init__(self, data)

        self.account_summary_keys = [
            'net_liquid_value',
            'stock_buying_power',
            'option_buying_power',
            'commissions_ytd',
            'futures_commissions_ytd'
        ]

        self.forex_summary_keys = [
            'cash', 'upl', 'floating', 'equity', 'margin',
            'available_equity', 'risk_level'
        ]

        self.profit_loss_keys = [
            'symbol', 'description', 'pl_open', 'pl_pct',
            'pl_day', 'pl_ytd', 'margin_req', 'mark_value'
        ]

        self.holding_equity_keys = [
            'symbol', 'description', 'quantity', 'trade_price', 'mark', 'mark_value'
        ]

        self.holding_option_keys = [
            'symbol', 'option_code', 'expire_date', 'strike',
            'contract', 'quantity', 'trade_price', 'mark', 'mark_value'
        ]

        self.trade_history_keys = [
            '', 'execute_time', 'spread', 'side', 'quantity',
            'pos_effect', 'symbol', 'expire_date', 'strike',
            'contract', 'price', 'net_price', 'order_type'
        ]

        self.order_history_keys = [
            '', '', 'time_placed', 'spread', 'side',
            'quantity', 'pos_effect', 'symbol', 'expire_date',
            'strike', 'contract', 'price', 'order', 'tif',
            'status'
        ]

        self.future_statement_keys = [
            'trade_date', 'execute_date', 'execute_time', 'contract',
            'ref_no', 'description', 'fee', 'commission', 'amount', 'balance'
        ]

        self.holding_future_keys = [
            'lookup', 'symbol', 'description',  # not duplicate expire date
            'spc', 'expire_date', 'quantity', 'trade_price', 'mark', 'pl_day'

        ]

        self.forex_statement_keys = [
            '', 'date', 'time', 'contract', 'ref_no',
            'description', 'commissions', 'amount',
            'amount_usd', 'balance'
        ]

        self.holding_forex_keys = [
            'symbol', 'description', 'quantity', 'trade_price', 'mark', 'fpl'
        ]

        self.cash_balance_keys = [
            'date', 'time', 'contract', 'ref_no', 'description',
            'fees', 'commissions', 'amount', 'balance'
        ]

        self.account_summary = dict()
        self.forex_summary = dict()
        self.profit_loss = list()
        self.holding_option = list()
        self.holding_equity = list()
        self.trade_history = list()
        self.order_history = list()
        self.cash_balance = list()
        self.future_statement = list()
        self.holding_future = list()
        self.forex_statement = list()
        self.holding_forex = list()