![]() |
|
| Discuss Utility to chart options data at the Options within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Since the earlier thread is not available, I thought of starting this to help in ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#1
|
|||
|
|||
|
Since the earlier thread is not available, I thought of starting this to help in charting options data.
Any programmers interested to help, please keep the following considerations in view. The file from NSE uses the first field as either futures or options, so the application must skip over all lines that have the first field as FUT(xxx) and read only lines that have the first field as OPT(xxx). The following line needs to be merged into OPTIDX, BANKNIFTY, 31-Aug-2006, 3410, CE OPTIDX,CE3410BANKNIFTYAug06, and other fields stay the same. New file is to be automatically saved. Pretty easy to do from VB, sadly I don't have a copy. Any volunteers? |
|
#2
|
|||
|
|||
|
Quote:
As I am not much familiar with future & option, I donot understand your point completely. But the job you need is simple. Please upload here (or send me) sample file (what input & output you need), I will make a utility for you. Regards K S Kachhwaha cemcompusoft@*****.com |
|
#3
|
|||
|
|||
|
Quote:
Given below is the downloaded copy of derivatives data from NSE Could you specify what else fields are required for charting files INSTRUMENT SYMBOL EXPIRY_DT STRIKE_PR OPTION_TYP OPEN HIGH LOW CLOSE SETTLE_PR CONTRACTS VAL_INLAKH OPEN_INT CHG_IN_OI TIMESTAMP FUTSTK WOCKPHARMA 26-Oct-06 0 XX 0 0 0 346.45 349.5 0 0 0 0 07-Aug-06 OPTIDX BANKNIFTY 31-Aug-06 3400 CE 0 0 0 212.3 754.4 0 0 0 0 07-Aug-06 Do give a sample file as asked by CEM Pankaj |
|
#4
|
|||
|
|||
|
Hi Cem and Pankaj,
The F&O bhavcopy in csv format can be downloaded here http://www.nseindia.com/bhavcopy/BhavHandler?segment=1 Line Sample F1 F2 F3 F4 F5 OPTIDX, BANKNIFTY, 31-Aug-2006, 3410, CE Cem, I don't know if you are using VB, but this is the sequence Read file into array Ignore all lines where field1 contains FUT Read all lines where field1 contains OPT Convert "31-Aug-2006" to Aug06 Do string merge of first 5 fields (from line above) to F5F4F2F3 without the delimiters. Field 6 onwards as it is, no change Save new array to file. Thanks for helping, I hope this is clear enough. Once the NSE csv has been processed, it should be importable by any software for charting. |
|
#5
|
|||
|
|||
|
Hi pasha
Below is the output I got from the little routine for converting derivatives file on optidex OPTIDX,CE3400BANKNIFTYAug06,0,0,0,212.3,686.7,0,0, 0,0,1-AUG-2006, OPTIDX,CE3410BANKNIFTYAug06,0,0,0,207.15,677.65,0, 0,0,0,1-AUG-2006, OPTIDX,CE3420BANKNIFTYAug06,0,0,0,202.1,668.65,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3430BANKNIFTYAug06,0,0,0,197.15,659.7,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3440BANKNIFTYAug06,0,0,0,223.15,650.8,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3450BANKNIFTYAug06,0,0,0,396.1,641.95,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3460BANKNIFTYAug06,0,0,0,391.35,633.1,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3470BANKNIFTYAug06,0,0,0,386.7,624.35,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3480BANKNIFTYAug06,0,0,0,382.05,615.6,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3490BANKNIFTYAug06,0,0,0,377.45,606.9,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3500BANKNIFTYAug06,0,0,0,372.9,598.25,0,0 ,0,0,1-AUG-2006, OPTIDX,CE3510BANKNIFTYAug06,0,0,0,415.35,589.65,0, 0,0,0,1-AUG-2006, I am not clear abt what should be header or is it headerless file. Can TA software recognise and import file This one is flat file. Pankaj |
|
#6
|
|||
|
|||
|
Hi Pankaj,
The following is from the NSE bhavcopy, my comments are in brackets( ) INSTRUMENT,SYMBOL,EXPIRY_DT,STRIKE_PR,OPTION_TYP,O PEN,HIGH,LOW,CLOSE,SETTLE_PR,CONTRACTS,VAL_INLAKH, OPEN_INT,CHG_IN_OI,TIMESTAMP, (Keep this line) FUTIDX,BANKNIFTY,31-Aug-2006,0,XX,4020,4135,4020,4109.3,4109.3,895,3649.96 ,94700,11200,7-AUG-2006, (Delete this line, starts with FUT) FUTIDX,BANKNIFTY,28-Sep-2006,0,XX,0,0,0,4150,4176.85,0,0,100,0,7-AUG-2006, (Delete this line, starts with FUT) ............... ............... ................ ................ FUTSTK,WOCKPHARMA,28-Sep-2006,0,XX,0,0,0,352.65,347.6,0,0,600,0,7-AUG-2006, (Delete this line, starts with FUT) FUTSTK,WOCKPHARMA,26-Oct-2006,0,XX,0,0,0,346.45,349.5,0,0,0,0,7-AUG-2006, (Delete this line, starts with FUT) OPTIDX,BANKNIFTY,31-Aug-2006,3400,CE,0,0,0,212.3,754.4,0,0,0,0,7-AUG-2006, (Ok, we start here and merge fields 2 to 5) OPTIDX,BANKNIFTY,31-Aug-2006,3410,CE,0,0,0,207.15,744.8,0,0,0,0,7-AUG-2006, Your example file is almost perfect, just leave the first line as it is and shift the date from field 9 to field 2 OPTIDX,CE3510BANKNIFTYAug06,0,0,0,415.35,589.65,0, 0,0,0,1-AUG-2006, becomes OPTIDX,CE3510BANKNIFTYAug06,1-AUG-2006,0,0,0,415.35,589.65,0, 0,0,0, Excellent effort, my sincere thanks to you and I'm sure others will use it too. If you are writing it in VB, could you put in a "process directory" choice, ie process all the files in a folder. The processed file can be saved with the same name and a prefix, so fo07AUG2006bhav.csv could become pfo07AUG2006bhav.csv |
|
#7
|
|||
|
|||
|
Hi pasha
Check this with headerline I am giving chioce for OPTIDX or FUTIDX as I am sure both could be used seperately. File naming convention is yyyymmdd.OPT.txt and yyyymmdd.FUT.txt. txt could be csv as well by choice or manually it could be changed. I have downloaded 11 derivatives files using my downloader. It will save file in yyyymmdd.csv format as that is accepted by many TA software. In same program I have converted it. Let me know if any more specification is needed. Pankaj Last edited by pkjha30; 8th August 2006 at 12:16 AM. |
|
#8
|
|||
|
|||
|
Hi Pankaj,
>I am giving chioce for OPTIDX or FUTIDX as I am sure both could be used seperately. You are right, some users may want futures data only. Your option file is prefect, I can't say for the futures as I know nothing of it. My connection is giving a lot of trouble today(courtesy BSNL) so I hope this message gets posted before it goes again. |
|
#9
|
|||
|
|||
|
Hi Pankaj,
I am not able to d/l your files to verify the header so just a couple of tips. The number of fields in the header must match the number of fields in the data. The 4 fields that are being merged into 1, need to be named TICKER(SYMBOL) in the header field. The final header is this INSTRUMENT,SYMBOL,DATE,OPEN,HIGH,LOW,CLOSE,SETTLE_ PR,CONTRACTS,VAL_INLAKH, OPEN_INT,CHG_IN_OI, In AB for equities the mainly used fields are Name,Date,Open,High,Low,Close,Volume in any order Edit: Managed to d/l the file, and found this header INSTRUMENT,SYMBOL,EXPIRY_DT,STRIKE_PR,OPTION_TYP,O PEN,HIGH,LOW,CLOSE,SETTLE_PR,CONTRACTS,VAL_INLAKH, OPEN_INT,CHG_IN_OI,TIMESTAMP, It needs to be this INSTRUMENT,SYMBOL,DATE,OPEN,HIGH,LOW,CLOSE,SETTLE_ PR,CONTRACTS,VAL_INLAKH, OPEN_INT,CHG_IN_OI, Last edited by pasha; 8th August 2006 at 01:46 AM. |
|
#10
|
|||
|
|||
|
Quote:
Check this attachment Pankaj |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads for: Utility to chart options data
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Down loading FC chart and Data | sankoorikal | Data Feeds | 2 | 17th October 2007 02:23 PM |
| F C Chart Customisation using Nse Data | sankoorikal | End of Day | 8 | 1st October 2006 12:06 PM |
| nifty option data chart in ab | rajneesh_mailbox | Options | 6 | 13th September 2006 09:18 AM |
| FREE DATA & CHART | a_n_i_l | Software | 6 | 25th September 2004 04:55 PM |
Indemnity, Disclaimer & Disclosure
Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum
Rules Disclaimer & Disclosure and indemnify Traderji.com, its
associates and related parties of all claims howsoever resulting from
the usage of the forum.
• Disclaimer: Trading or investing in stocks & commodities
is a high risk activity. Any action you choose to take in the markets
is totally your own responsibility. Traderji.com will not be liable for
any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
• Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein.
The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.