Skip to content

Instantly share code, notes, and snippets.

@kevin3
Created March 8, 2013 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevin3/5119111 to your computer and use it in GitHub Desktop.
Save kevin3/5119111 to your computer and use it in GitHub Desktop.
commission calculator for two typical online trading platforms for SGX in SGD, Standard Chartered Bank and Lim & Tan Disclaimer: the values calculated work for me but I have noticed the values differ a bit due to rounding
#Sample Contract Value
vol=1000
price=10
volprice=vol*price
def commSCB(volprice):
"SCB commission is fixed 0.2%"
brokerage=volprice*0.2/100
clearingfee=0.04/100*volprice
#no SGX trading fee
GST=0.07*(brokerage+clearingfee)
total=brokerage+clearingfee+GST
return total
print "SCB commission $",commSCB(volprice)
def commLT(volprice):
"LimTan online trade commission is 0.28% (up to $50,000) min $25"
commlist=[25,volprice*0.28/100]
brokerage=max(commlist)
clearingfee=0.04/100*volprice
tradingfees= 0.0075/100*volprice
GST=0.07*(brokerage+clearingfee+tradingfees)
total=brokerage+clearingfee+GST
return total
print "LimTan commission $",commLT(volprice)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment