In my code, I am buying INFY and SBIN shares at the start of every week for the past year. But during the backtesting I assign only 100 rupees as capital, so in reaility I wont even be able to buy the shares as the price of INFY and SBIN is much greater than 100. So how is the backtest in the blueshift platform working. Why is it not throwing an error
This is an excellent observation.
In general, brokers usually offer leverage. This leverage can be considerably significant depending on the asset (e.g. CFDs) and your relationship with the broker (e.g. prime brokers for large hedge funds). The library we use for backtest (zipline) does not make an assumption of max allowed leverage, and assumes infinite buying power. This is very different in real trading, where you will get a margin call, or liquidated.
A better way will be to allow users to set their max allowed leverage. Unfortunately the library does not support this directly. The only way to specify a max leverage at present is to use the order_percent or order_target_percent functions (which automatically sizes your order based on account net value). If you try these functions for ordering, you will see that with 100 capital, there are no trades at all in your account. Our inhouse library, which will replace zipline soon, will have an explicit API function to set max leverage (along with end-of-day MTM settlements) that will be closer to the reality. The new version will throw an error if, after MTM settlement, your account goes to negative equity.
Thank you so much for your reply.