Fixed Entry Price for Option, Warrants, Futures
Author: mschneider
Creation Date: 3/9/2011 3:36 AM
profile picture

mschneider

#1
Aloa,

possibly a stupid question: How can I code a trading system which always buys for 10$ but moves on according to the underlying (DOW, ...). I would like to use this for eg options, warrants or futures where I can choose one with a prefered entry price and a linear movement to utilize some kind of leverage.

Thanks,
matthias
profile picture

Eugene

#2
Hi Matthias,

A couple of questions. First of all, what does it mean: "buys for $10"? Is it the fixed price of the instrument? (Obviously does not look like position sizing to me.) Considering the different asset classes e.g. options and futures, why $10?

Next, could you clarify the meaning of "moves on according to..."? Where and why it moves? Do you have a set of trading rules to illustrate the idea?
profile picture

mschneider

#3
Hi Eugene,

the fixed price of the instrument reflects the idea of trading turbo- or knock-out certificates: I can buy the DOW for 10$ while the underlying index value is 12000.
A rising to 13000 means for the DOW +8.3%, the certificate gains with each point one cent so at the same time it would be 20$ or +100%.
The point is, with a rising value of the certificate it's leverage decreases. So I' looking for a method to enter the next position at lets say DOW 13000 with another certificate for 10$.

Doesn't it work to fix the entry-price for a) the buying paper to 10$ and b) calculate it's moving price by
security.actual = security.entryprice + (index.actual - index.entryprice)

I thought maybe something like this might work:
Bars external = GetExternalSymbol("DOW", true);
...
if (CrossUnder(bar, external.Close, ma))


The problem is that I don't have any data for the security I'm trading because this I need to derive.


Code could be like that:
CODE:
Please log in to see this code.


Thanks,
matthias
profile picture

Eugene

#4
Chances are I'm missing something here but why not simply set up a multi-position script that would buy on every $10 drop? Bear with me, the whole concept sounds so new. Maybe some other more experienced community members could share an idea.
profile picture

mschneider

#5
Sorry, I thought certificates or options would be easier to understand and include.

Give me one more chance:
DOW is about 12,100. Now I'm buying some KO certificates, in the example above for 10$, could also be 5$ or 2$. This price is simply based on the underlying value's distance to the KO barrier of the certificate: A Call-KO-Certificate with a barrier at 11,500 would cost right now 6.00$ ( 12,100 - 11,500 = 600 and disregarding spread & comission). Since the risk decreases with increasing distance to the barrier the leverage decreases as well.

Now I spent 1,000$ for 10$ certificates = 100pcs.
In this case it doesn't make sense to me to buy a certificate at DOW 10,000 and hold it until 11,000 ( = 10$ x 100pcs = 1,000$ win).

Here it would be useful to exit at eg. 10,500 and buy a new certificate for again 10$ but a higher leverage.
5$ x 100pcs = 500$ win
Reinvesting 1,500$ for 10$ certs = 150pcs
5$ x 150pcs = 750$ win
Total win would be 1,250$.

And that is the reason I would like to code each entry with a given price but then following the underlying symbol's price linear.

Doing this with options would be similar but there are too much 'random' factors.
profile picture

Eugene

#6
Thank you for the clarification. To purchase a security (i.e. a KO certificate) at a price (e.g. $10), you need either to run the script on its data or call SetContext() to trade on the external symbol if it's not included in your DataSet. But the symbol can't be virtual (e.g. a Bars object created on-the-fly), the key is having it in one of your DataSets. From what I understood, it's by no means an option here.

Since the Dow seems to be the driving force behind your certificate purchases, I'd suggest you keep trading the index in a multi-position script, determining when to buy or selling according to a function implementing the logic you just illustrated.
profile picture

Eugene

#7
To anyone interested:

WLD 6.9 introduces backtesting of synthetic option contracts. See CreateSyntheticOption etc. in the QuickRef.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).