---
title: "Discussion on \"SGB Discount Calculator - Buy Gold at a 30% Discount!\" | Hashnode"
description: "Discussion on \"SGB Discount Calculator - Buy Gold at a 30% Discount!\". A tool to identify listed SGBs with discounts on their Fair Value"
url: "https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [SGB Discount Calculator - Buy Gold at a 30% Discount!](https://blog.amitwani.dev/sgb-discount-calculator-buy-gold-at-a-30-discount?utm_source=hashnode&utm_medium=feed)

A tool to identify listed SGBs with discounts on their Fair Value

Mar 12, 2022 · 3 min read · blog.amitwani.dev  
Updated Jul 10, 2024  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#express](https://hashnode.com/tag/express)
-   [#mongodb](https://hashnode.com/tag/mongodb)
-   [#docker](https://hashnode.com/tag/docker)
-   [#business-and-finance](https://hashnode.com/tag/business-and-finance)

## Written by

[Amit Wani](https://hashnode.com/@mtwn105)

@mtwn105 · Mumbai, India

  
[View profile](https://hashnode.com/@mtwn105)

Passionate Software Engineer! 💖

𝗪𝗔𝗥𝗥𝗜𝗢𝗥! Full Stack Developer | SDE Reliance Jio 🖥️ Tech Enthusiastic 💻 Man Utd 🔴 Sachin &amp; Dravid fan! ⚾ Photography 📸 Get Hands Dirty on Keyboard!

## Responses 6

Markdown supported · ⌘↵ to post

[vaibhav khandelwal](https://hashnode.com/@vaibhav230)

[Sep 19, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/63281f9599624fc71cd50dd3)

Hi, I have calculated the yield basis the code you have given (yield: (sgb.issuePrice \* sgb.interestPayable) / sgb.askPrice), however the result is coming different to what being shown at calculator website.

SGBJUL28IV: \[Issue Price (4852) \* Interest Payable (2.5%)\]/Ask Price (4838) = 2.51% compared with 2.74% yield on calculator website.

Can you please help on this ?

[DA](https://hashnode.com/@DA230)

[Jul 4, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/62c35b39c0401b3dcbcfe824)

Hi,

Thanks for sharing the tool! It is super helpful!

As a feature addition, is it possible for you to add returns calculator, especially for the SGBs bought through the secondary market?

TIA!

[Amit Wani](https://hashnode.com/@mtwn105)

[Jul 5, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/62c35b39c0401b3dcbcfe824#reply-62c3f843ccecfb25bbc7aff7)

Thanks for your comment. Can you explain what type of returns calculator you want?

[Akeshwar Jha](https://hashnode.com/@akeshwar)

[Jul 4, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/62c2b471ccecfb25bbc7800c)

Great tool! Helped me filter some undervalued SGBs. The parameters given - YTM, years to maturity, discount and liquidity are really helpful to arrive at the desired SGB.

A few customizations would make this even more desirable!

1.  Ability to edit the discount rate. It could default at 9-11% because that's the historical return of gold.
2.  Capital gains projections. Initially, historical gold returns could be extrapolated. This will give an overall approximated return. Down the line, a better model could be worked upon.
3.  **Minor update request:** Tax slab to adjust for the taxes on the interest. Default could be 30%, given the audience of this tool.

Overall a great analyzer. Thanks for building this :)

[varun](https://hashnode.com/@vagar)

[Mar 20, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/62367cc48e4fae3f767de115)

Thanks for making this tool Amit. I was really looking for something like this.

Do you think you can make something similar for NSE bonds getting traded in capital market.(Not able to add link).

Really Awesome !! Thanks again.

[Amit Wani](https://hashnode.com/@mtwn105)

[Mar 20, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/62367cc48e4fae3f767de115#reply-6236b67abef4c71aa6f111c3)

Hi Varun, Glad you liked it. Can you provide more details about it, on twitter? @mtwn105

[Rohit](https://hashnode.com/@Badgujarrohit)

[Mar 13, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/622e56c1197586d5f925c7de)

Great amit

[Amit Wani](https://hashnode.com/@mtwn105)

[Mar 14, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/622e56c1197586d5f925c7de#reply-622f7bc5df08b9b82341b990)

Glad you liked it. Let me know if you have any suggestions!

[Vinod](https://hashnode.com/@vinod1)

[Mar 13, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/622d82c72f73c1ca2f298a3f)

great tool. Thanks.

[Amit Wani](https://hashnode.com/@mtwn105)

[Mar 13, 2022](https://hashnode.com/posts/sgb-discount-calculator-buy-gold-at-a-30-discount/622c5849df08b9b823416e7d/comment/622d82c72f73c1ca2f298a3f#reply-622d8f072f73c1ca2f298b0f)

Glad you liked it. Let me know if you have any suggestions!
