Simian
Algorithmic Trading
Overview
$10.69M
AUM
-$241.82K past month
$1.21M
Total Return
+$27.8K past month
92.79K
Trades
+16.44K 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 and open an account today.
Strategies
1.95K%
Mandrill
+0.49% past month
6.16%
Lemur
+0.81% past month
Funds
345.22%
SSMXX
+0.49% past month