Simian
Algorithmic Trading
Overview
$15.39M
AUM
+$2.83M past month
$4.1M
Total Return
+$273.37K past month
196.73K
Trades
+17.99K past month
class Simian(trader):
    def __init__(self, *args, **kwargs):
        super(self.__class__, self).__init__(*args, **kwargs)
        self.__dict__.update({k : eval(v) for k, v in os.environ.items() if k in self.envars})

        with open("params.json", 'r') as fp:
            self.__dict__.update(json.load(fp)[self.args.name])

        self.ibkr_init(self.account)

        self.db = db_connect(self.dbname)
        self.date = dt.datetime.today()

    def place_orders(self, symbols, qty):
        self._submit_order(symbols, qty, ['BUY', 'SELL', 'SELL', 'BUY'], 'MKT', 'DAY', order_class='multileg')

    def cache(self):
        self.refresh_lst()
        self.ibkr_touch()
        self.chain = self.ibkr_chain(self.underlying, dt.datetime.now())

    def trade(self):
        try:
            schedule.clear()
            self.schedule_at(self.cache, '06:00') 
            try:
                self.bp = self.get_equity()
            except Exception:
                logging.error(traceback.format_exc())
                print('Failed to retrieve ledger, retrying in 5...')
                sleep(5)
                self.bp = self.get_equity()

            for qty, t in zip(self.qtys, self.times):
                self.schedule_at(self.open, hour=t.hour, minute=t.minute, qty=int(qty))
                
            self.wait()
                
        except Exception:
            logging.error(traceback.format_exc())
Algorithmic Trading
Keep your goals. Beat the market.
Automated trade execution.
Real-time risk mitigation.
Algorithmic fund management.
Simian is investing for the modern market.
See what we can do for you.
Funds
0%
SSMAX
+0.00% past month
1.79K%
SSMXX
+3.12% past month