Ledger Entry Questions

Hi @nithin and @siva. Kindly put up a blog on zconnect explaining the different terminology of ledger Entry in zerodha account and methods used for calculation. I m unable to comprehend the method you used for f&o MTM settlement.

Let me elaborate what I understand and what not understood. Creating any long or short future will require some margin amount and MTM has to be covered by cash on daily basis. Squaring off the future position will result in settlement similar as MTM settlement, though it would be last time MTM plus charges.

Not so understood portion is short option position. Sure there will be some margin money blocked. Consider I sold ABC SEP 150 CE @ RS 10. After few days it closed @ Rs 15. I understand that no MTM in this case rather more margin money is blocked. If I sold at this point the loss amount should be deducted from available cash. instead I remain short and after few days it came down to RS 5. less margin is required at this point. And I squared off by buying. Then profit should be added in the available cash.
In summary, running profit or loss in short option should not be calculated through MTM method but through increased or decreased amount of margin and only when the position is squared off, loss or profit should be adjusted with free available cash.

But I have observed that this is not happening and things are being mixed up. Where to see the breakup of MTM and where to see final loss or profit for F&O position.
Regards.

Hi, can anyone helps me in understanding how zerodha calculates MTM and final settlement on future (long/short) and short option position. As I understand these position entails some margin money which changes every day and reverse entries are made. And combined profit or loss on these position should be added or subtracted to free available cash position, on daily basis. But I m not seeing the value in my ledger which my mind calculates. Contract note also not showing any direct calculation in this regard.
@nithin and @siva are not interested in replying this query. So any attempt by other boarders are most welcome.

@nithin @siva

See how console is showing different results in ledger for different search criteria with dates.

Which one is correct?

For options there is no daily m2m settlement, anyhow one of our colleague will check this and give you more clarity on this.

The order of the entries in the ledger statement in Console would change when the selected date range would change. Due to a change in the display of the order of entries the net balance could change. However, this wouldn’t change your opening or closing balance. We have locked all the the entries so that the order does not change and the net balance will remain the same irrespective of the date range.

@Nakul, do you understand what you say. I too have some knowledge of database management. Why order of the entries would change with selected range of dates. There must be some bugs in your code. By the way, in present form of ledger statement in console, opening or closing balance doesn’t show, that’s another drawback. However, whatever comes in the last or latest, if we consider that as closing balance, that is also different in each case. Your console is full of bugs and Q is mandatorily redirecting to console.

@nithin and @siva you need to genuinely focus and invest to backend platform. Zerodha is slowly becoming typical indian company.