Click here to Skip to main content
12,450,766 members (52,422 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

26.3K views
664 downloads
6 bookmarked
Posted

Conversion of decimal to tick format and vice versa

, 30 Dec 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
VB script Algorithm to convert from decimal to ticks and vice versa

Introduction

Tick format is pretty common format used by traders in fixed income trading. Decimals can be very mind-numbing to look at; tick format is very convenient to track small changes in price/yield of the bond. Here is a brief example: Tick Value: 99-105 Equivalent Decimal Value: 99.332. Anatomy of Tick Value: 99=pre decimal value. 10=Tick value and is 1/32nd of decimal. 5=1/8th of of 32nd. We can convert to decimal as follows: Decimal Value (99.332) = 99 + ((10 + (5/8)) / 32)

Background

I tried googling algorithm for doing it but could not find anything useful and decided to write one of my own. I have written this in VB script. This could be easily converted to C#/VB.Net or any other programming language.

Using the code

“+” and “-“ buttons in attached excel file typically increments / decrements the number in cell ‘b5’ by 1/8th of a tick. For example: Number in cell b5: 99-106. Clicking “+” button: 99-107. Clicking “-” button: 99-105. Cell “b10” presents the decimal equivalent of the tick value presented in cell “b5”. Special Notation: If the number in 1/8th of a tick in ‘4’ then it is represented as “+”. That is, 99-104 will be presented as 99-10+

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Swapnil Kulkarni
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralMy vote of 5 Pin
Southmountain15-May-13 11:35
memberSouthmountain15-May-13 11:35 
QuestionThanks! Pin
Lupuj17-Dec-12 23:27
memberLupuj17-Dec-12 23:27 
Questionthanks.. Pin
Jozo Leko12-Nov-12 22:43
memberJozo Leko12-Nov-12 22:43 
QuestionThanks for Sharing this Pin
Rak_i12-May-12 14:05
memberRak_i12-May-12 14:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160826.1 | Last Updated 30 Dec 2007
Article Copyright 2007 by Swapnil Kulkarni
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid