PC-SPAN (Page 20) - Options on Futures | futures.io
futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Traders Hideout > Options on Futures


PC-SPAN
Started:October 23rd, 2013 (09:36 AM) by ron99 Views / Replies:41,386 / 403
Last Reply:November 19th, 2016 (08:49 AM) Attachments:100

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike
     

Reply
 100  
 
Thread Tools Search this Thread

PC-SPAN

Old May 9th, 2014, 01:01 PM   #191 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 179 since Sep 2012
Thanks: 24 given, 198 received


BlueRoo View Post
The issue is that the calMargin code in XLS SPAN consistently seems to change the spread number of the last spread in Col F.

I fixed that issue by leaving the Col F alone if there was an existing value.

I also wanted a way to track all my positions on the Tracker tab with one click. The code I came up with runs through each position and as long as all positions of the spread have the same number in Col F and are adjacent they will be calculated as a spread, one spread at a time. Then it calculates all the remaining positions individually. My code might not match up with yours because I have modified the Track Spread to accommodate more than two positions, but if you are interested I can get you the code.

Also, if you are interested in tracking several positions historically I'd suggest looking at running that through the Tracker rather than the Historic tab (use code to change date on Scanner, track positions on Tracker, and save the data ... then examine results in a pivot table).

Reply With Quote
     

Old May 9th, 2014, 02:02 PM   #192 (permalink)
Trading for Fun
Brisbane, Queensland, Australia
 
Futures Experience: Intermediate
Platform: OX, Z360, Excel
Broker/Data: DeCarley
Favorite Futures: Futures and Future Options
 
Posts: 121 since Aug 2013
Thanks: 75 given, 96 received


Dudetooth View Post
I fixed that issue by leaving the Col F alone if there was an existing value.

I also wanted a way to track all my positions on the Tracker tab with one click. The code I came up with runs through each position and as long as all positions of the spread have the same number in Col F and are adjacent they will be calculated as a spread, one spread at a time. Then it calculates all the remaining positions individually. My code might not match up with yours because I have modified the Track Spread to accommodate more than two positions, but if you are interested I can get you the code.

Also, if you are interested in tracking several positions historically I'd suggest looking at running that through the Tracker rather than the Historic tab (use code to change date on Scanner, track positions on Tracker, and save the data ... then examine results in a pivot table).

I have not modified any of the code in my copy of your file. Can you post how you fixed the code so Col F is not modified by calMargin(3,0).

Yes, I am interested in getting the code you have for updating all positions on tracker with one click. I am sure we have both done it slightly differently. But looking at both may produce the better code.

Yes, in my shell code I have tracker positions being record historically for each EOD Risk File, so that positions can be seen through DTE.

Reply With Quote
     

Old May 9th, 2014, 03:11 PM   #193 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 179 since Sep 2012
Thanks: 24 given, 198 received



BlueRoo View Post
Can you post how you fixed the code so Col F is not modified ... Yes, I am interested in getting the code you have for updating all positions on tracker with one click.

Here's what I came up with. The fix for the Col F is built into the modified CalcMargin sub.

It will no longer prompt you to select each side of the spread. It is now like the Track Select ... highlight the positions in your spread and then click the Track Spread button. If it is a new spread (no number in Col F) it will give it a number. If it already has a number in Col F it leaves it as is. I've tested it with spreads that have four legs and it works fine, theoretically it should be able to handle as many legs as you want in a spread (the next step for true portfolio margin calculation). It will also add two new columns of info: AE is the current ROI if position was exited early and AF is the current $ P/L.

It should be a simple swap-out of the existing subs in your spreadsheet with those attached ... just let me know if you have any trouble with it.

If you don't mind sharing, how are you analyzing the data you get tracking multiple positions through the tracker ... are you just running it in a pivot table or something else?

Attached Files
Register to download File Type: txt Mod Code.txt (24.6 KB, 13 views)

Last edited by Dudetooth; May 9th, 2014 at 05:45 PM.
Reply With Quote
     

Old May 9th, 2014, 07:46 PM   #194 (permalink)
Trading for Fun
Brisbane, Queensland, Australia
 
Futures Experience: Intermediate
Platform: OX, Z360, Excel
Broker/Data: DeCarley
Favorite Futures: Futures and Future Options
 
Posts: 121 since Aug 2013
Thanks: 75 given, 96 received

Missing Function

Your modified calcMargin has a call to a new function called optionvalue. Could you post this missing code.

Yes I am happy to share what I am doing with my shell code optionanalysis.xls. I will post this later. Essentially I am looking at the data your engine provides and processing it graphically and statistically.

Not sure what your plans are for your code but it has been a great help.

Is the code to scan risk files in your default directory of any value?

I am very happy to contribute whatever I can as a sign of appreciation for the work you have already done.

You probably can already tell that I am not essentially a coder. I am more of a app designer and architect. But I can code and have been for 15 years to support my trading activity. My code will just be a little messy and in the past has be reworked by coders after a prototype or design stage (app work I have done in CRM during my career).

Reply With Quote
     

Old May 9th, 2014, 09:30 PM   #195 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 179 since Sep 2012
Thanks: 24 given, 198 received

Futures Edge on FIO

BlueRoo View Post
Your modified calcMargin has a call to a new function called optionvalue. Could you post this missing code.

Here are the missing functions. If there are too many more missing parts I can look to post my latest spreadsheet (after a while you lose track of all the changes you make).


BlueRoo View Post
Essentially I am looking at the data your engine provides and processing it graphically and statistically ... Not sure what your plans are for your code ...

I am looking forward to seeing the way you are processing and analyzing the data. Right now I mainly use this for risk management, but I have been looking more at back-testing ideas ... mainly with spreads. That and I'd love to have full portfolio margin calculation, but right now that looks pretty daunting.


BlueRoo View Post
Is the code to scan risk files in your default directory of any value?

I'm not sure I fully understand your question. Were you asking about the code I use to list the pa2 files? If so, I have included that with the attachment ... if not please help me to understand what you asking.


BlueRoo View Post
I am very happy to contribute whatever I can

Thank you ... I always love getting a glimpse at what other people are doing with their analysis.

Attached Files
Register to download File Type: txt OptionValue.txt (2.2 KB, 15 views)
Reply With Quote
     

Old May 9th, 2014, 10:13 PM   #196 (permalink)
Trading for Fun
Brisbane, Queensland, Australia
 
Futures Experience: Intermediate
Platform: OX, Z360, Excel
Broker/Data: DeCarley
Favorite Futures: Futures and Future Options
 
Posts: 121 since Aug 2013
Thanks: 75 given, 96 received

The optionValue Function is what I was missing.

I will test the Listpas2Files Procedure. It is similar to the code for the same task that I posted earlier. But it actually reports the date range for the saved risk files. Yours rebuild the list in Col A. My approach is to say you don't need Col A. If you know the date range of your save risk files (which my code reports to the user in the input box) then the dates for the selected date range can be directly entered into Col F. At this moment my approach does not remove the dates with no returned data. Visually I find this easier to look at in bock so weeks. My approach would be then to removed dates with no returned data when I take the time series and move it for analysis. This is because when presenting the time series in a chart two axis's are required. I chart vol and delta on one axis and option price on the other. why because of the different numbers, it is easier to reformat vol and delta to normal decimal numbers e.g. vol at 20% becomes .2 and delta of 20 becomes .2 - therefore the two values are compatible for assignment to a secondary access in a chart which then leaves the primary axis for option price. (let me know if this is not clear.) So you will be able to deduce that I reprocess the data from tracker and historic into newly formatted data sets for analysis.

Use for analysis. Yes we are thinking alike. I see your file useful for both risk management and candidate search.

The ability to retrieve both snapshot and time series data sets is the key. An ability without the work you have down I would not have access too. Again thank you.

Yes, if you wish to develop the code further and I can help maybe a current XLS SPAN file is a good idea.

Reply With Quote
     

Old May 9th, 2014, 10:17 PM   #197 (permalink)
Trading for Fun
Brisbane, Queensland, Australia
 
Futures Experience: Intermediate
Platform: OX, Z360, Excel
Broker/Data: DeCarley
Favorite Futures: Futures and Future Options
 
Posts: 121 since Aug 2013
Thanks: 75 given, 96 received

Track Spread Code

Okay I see you have removed the input boxes. Now you simply need to select the vertical cels for the spread you wish to trade and click track spread. This great.

The code I have goes the next step. if there are 10 spreads in tracker, with one click the are all process without any need for the user to selected any cells.

Reply With Quote
     

Old May 10th, 2014, 08:56 AM   #198 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 179 since Sep 2012
Thanks: 24 given, 198 received


BlueRoo View Post
The optionValue Function is what I was missing.

If you do any grains you'll need the GrainValue function as well.


BlueRoo View Post
Yours rebuild the list in Col A.

I went the lazy way ... it was the easiest way to get things done. If I wanted to test how an idea would have worked last year at this time, I set my historic dates to start on 5/10/13. I have no idea what day of the week that was, but the code will find the closest pa2 file I have in my folder and then give me dates for the next 30 trade dates. I understand the angle you are going, I just found it easier to simply have a list of the dates available and grab from that. It's a horse apiece I guess.


BlueRoo View Post
So you will be able to deduce that I reprocess the data from tracker and historic into newly formatted data sets for analysis.

I left the rough code I have been using for back-testing along with a sample of the results on the Tracker tab so you can see the route I was taking. Unfortunately, you have to dig through the code in the Backtest module a bit (I don't have all the user-friendly buttons for these subs).

I have focusing primarily on the price to see if an idea is viable, but I could see where incorporating other variables would be beneficial. Any ideas on tweaking the back-testing would be appreciated.


BlueRoo View Post
The code I have goes the next step. if there are 10 spreads in tracker, with one click the are all process without any need for the user to selected any cells.

The code that is in for Track All will calculate for spreads and individual positions alike. Once a spread has been identified (you used Track Spread on multiple rows and they now have a number in Col F), click Track All and it will calculate each spread down the list and then the remaining individual positions. Try it on the one I uploaded to see what I'm talking about.

There's a couple of other tweaks in there from the last release, pretty much my "work in progress" spreadsheet.

Attached Files
Register to download File Type: xls XLS-SPAN (04b).xls (1.90 MB, 40 views)
Reply With Quote
     

Old May 10th, 2014, 06:18 PM   #199 (permalink)
Trading for Fun
Brisbane, Queensland, Australia
 
Futures Experience: Intermediate
Platform: OX, Z360, Excel
Broker/Data: DeCarley
Favorite Futures: Futures and Future Options
 
Posts: 121 since Aug 2013
Thanks: 75 given, 96 received

Appreciate the new file. It is considerably larger and with a quick look at the code there is a bit to take in.

I feel that I should apologize. I see my suggestions where redundant. You are doing a great job on improving what is already a tool that has real value.

So rather than stepping on your toes I would be happy to take your direction on testing anything you wish to have checked.

The back-testing is a fantastic addition.

Here are two screen shows that are generated on the fly by the code in my option analysis file that utilises the data from your file. This is a snapshot. Based on the option chain.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
     
The following user says Thank You to BlueRoo for this post:
     

Old May 10th, 2014, 09:48 PM   #200 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 179 since Sep 2012
Thanks: 24 given, 198 received


No need to apologize. I hope I didn't come across as dismissing your ideas, I just hadn't thought about posting what I have been toying with in the spreadsheet until I saw that you had fixed some of the same issues I had found.

I don't really have any direction I am going with the spreadsheet right now. My main focus is to come up with some new trading ideas, so I have been looking at the back-testing. Normally, I come up with new tools as I run into issues/problems or when I see what other folks are doing.

From the looks of your spreadsheet, I highly doubt that you would be stepping on any toes with me ... screenshots look impressive. I must admit that I immediately wanted to take a look "under the hood" and see what you have in there. If/when your are willing to share some details, I'd love to see some the tools you have developed and get a glimpse of the way you are analyzing potential trades.

Reply With Quote
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Traders Hideout > Options on Futures > PC-SPAN

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

NinjaTrader 8: Features and Enhancements, Tips and Tricks

Dec 6
 

Al Brooks: Stop Losing when a Good Trade goes Bad, Correcting Mistakes

Elite only
 

Trading Technologies: Algo Design Lab hands-on

Dec 13
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Current PC Specs tderrick Tech Support 45 October 28th, 2012 04:40 PM
Any PC Gamers in here? forrestang Off-Topic 61 October 10th, 2012 03:37 PM
Virtual PC setup how? boze man Tech Support 5 September 8th, 2012 04:59 PM
I need PC help Boomer34 Tech Support 5 January 22nd, 2012 03:28 PM
PC Question NMTrader Off-Topic 0 July 12th, 2009 11:56 PM


All times are GMT -4. The time now is 12:35 AM.

Copyright © 2016 by futures.io. All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
 
no new posts

Page generated 2016-12-02 in 0.15 seconds with 20 queries on phoenix via your IP 54.146.141.60