[Algo Trading] Arbitrage Trading for retail traders BSE/NSE. Part 2. Break-Even Analysis

Lets continue from Part 1. Here the objective is to identify the minimum difference of prices across market i.e. BSE/NSE, so that we can pay all the charges and get at least some profit. Simply, the plan is to find out Arbitrage Trading Opportunities worth taking.

To understand break-even (the point where we make no profit-no loss) first we need to focus on the cost of the trade(s). For that purpose we’ll define a simple utility function. We’ll reference the standard schedule of charges of Zerodha (mainly because of flat pricing structure)

The comments are pretty self-explanatory (We’ll modify the formula in terms of turnover later, but this should explain it better). Either way, we are considering the following charges as mentioned on the above link,

Zerodha Charge List

Zerodha Charge List

Now lets plot some graphs to understand what is happening behind the scene. First, we’ll be calculating the cost of trade in arbitrage strategy, against quantity traded quantity (Again we’ll consider turnover at later stage).

Again we’ll write a very simple piece of code

I used the following assumptions to construct the graph,

  1. I sell at Rs 1000 and sell at Rs 1000.5
  2. close the position when the price in BSE and NSE are same.

Lets see what is our total cost for the transactions for different quantities traded. Here the X-Axis denotes quantities traded and Y-Axis denotes total cost of trade. So we need to make profit at least more than the cost.

cost of trade graph

cost of trade graph

The graph is linear. That means the cost is a fixed percentage. Initially it is a bit higher ( slop is higher), after some point it becomes lower. But fixed percentage Nonetheless. ( The point is where flat Rs 20 brokerage starts applying ). This seems good.

Lets move, Now we want to see something more useful. Lets say,

  • We buy at value 1001. And sell at a different value in a different market. We want to see how much we will make at different sell values.
  • We want to see how much we are actually making for a particular quantity of stocks traded.

Again we’ll write some simple code,

Now we see quantities along X-Axis and net profit after paying all the charges along Y-Axis,

Quantity vs sell value
Looks cool, but doesn’t seem exciting, isn’t it? You buy 240 shares at 1001 and sell higher, simultaneously. You only earn approx Rs 226 even if you sell at Rs 1002.8

Lets, think

  • To take a trade of Rs 2,40,240 (i.e. 240 * 1001) you need cash or collateral of 2,40,240/10 i.e. Rs 24,024 only
  • Rs 226 return from Rs 24,024 means roughly 0.94% return. Looks tiny…. Read ON
  • Think about the time period money is invested. It is normally a couple of minuets. Say you are tracking only nifty 50 stocks for liquidity. You spot ONE arbitrage opportunity an hour, an could capitalize only 20% of it ( capital locked in some other trade). That means 10 trades as hour. In roughly 6 trading hours that’s 60 trades.
  • Among them 5 trades went wrong. So now you have profits of only 50 trades (assuming roughly equal profit/loss on all trade).
  • 0.94% return in 50 trades gives you 47% return over a day. That means 940% a month (considering 20 trading days). Doesn’t this look like a HUGE NUMBER ( back to reality, there are lots of other factors at play. So real return will be much less e.g. we might not get a 0.16% spread all the time. The idea is to show how small but consistent numbers add up)

Note: Spread is the difference between price difference across exchanges.

Common, still there are fine points to consider before taking up a real trade. I’ll write as I explore them. To see conclusive verdict see final post in the series.


1 comment for “[Algo Trading] Arbitrage Trading for retail traders BSE/NSE. Part 2. Break-Even Analysis

  1. xxPro_Hacker_xx
    July 24, 2017 at 10:57 pm

    Meh… the ads were so bad…. I was enjoying the article thoroughly until the ads ruined it all.

Leave a Reply

Your email address will not be published.