New thread: applications and methodology discussion
I am going to start a new thread with emphasis on hedge fund algorithmic (automated) management.
In this thread, we explore and refine in detail hedging techniques by making a complete exploration, with particular emphasis on:
- "Player superposition"
- Protective "option units"
We will also review and discuss systematically all the details of the scalping/hedging rules ("game"), including entries, exit and order sizing.
We have initiated this journey in previous threads, and here we will be continuing this development.
Constructive criticisms, conceptual contribution and new ideas are always welcome. As to destructive comments, trolling, or gratuitous discredit attempts, please keep them for yourself: we don't need them. If you feel compelled to promote your own projects within this thread, please do it properly, through a meaningful contrast of methodological approaches at a conceptual or implementation level (and avoiding insulting our work).
"Real world" expectations for results
To avoid the usual comments from some well known trolls (fortunately very few on this great site), coming out and interfering in the middle of an "investment phase", let me clearly say the following.
We are not expecting to get rich "overnight": this is systematic process of investment requiring patience and we may well expect to stay several weeks "underwater" before our "investment" starts showing results.
The equity curve will (typically) have a "cyclic" behavior, alternating load phases ("troughs") to return phases ("crests"). As the trading proceeds the load phases will be deeper and deeper, and the returns will periodically hit new higher watermarks. Each "cycle" may last several months (3 to 6 or more) and the cycle length may tend to grow over time. This will, in practice, mean that we may very well go 2-3 times "underwater" again, even if we previously reached pretty good profits, before (hopefully) remaining permanently "above water", in the next cycles.
The folio composition and the hedging techniques may "smooth" a bit the cyclic behavior, depending on how much investment is absorbed by single instruments and on instruments' leverage. Clearly, an ideal world situation would be to keep the allocation rather "uniform" across instruments, but that is not always achievable in practice, as the instruments themselves undergo periods of variable volatility with occasional "blasts" of very high volatility.
Account initial status
To avoid psychological "interferences" I will be using an Interactive Brokers' simulated account with the following initial situation (values received via API):
while the situation shown via API is the following (retrieved by the app, via API)
<code>ACCOUNT INFO from IB (Accounts in login: DU163281 Selected: DU163281)
============================================================ DU163281 =============================================================
Acct update event last received from IB: Mon 21 Jul 2014 14:52:29:995 [ Mon 21 Jul 2014 08:52:29:995 edt ]
- Currency: EUR Exchange rate: EUR/EUR 1.00
- Current values (received on: Mon 21 Jul 2014 14:52:29:995 [ Mon 21 Jul 2014 08:52:29:995 edt ]) -
AccruedCash 0.00 EUR [Min: 0.00, Max: 0.00]
AccruedDividend 0.00 EUR [Min: 0.00, Max: 0.00]
BuyingPower 2,957,606.40 EUR [Min: 2,957,606.40, Max: 2,957,606.40] (4.00 x 739,675.04)
FullAvailableFunds 739,675.04 EUR [Min: 739,584.78, Max: 739,962.39]
FullExcessLiquidity 739,675.04 EUR [Min: 739,584.78, Max: 739,962.39]
FullInitMarginReq 0.00 EUR [Min: 0.00, Max: 0.00]
FullMaintMarginReq 0.00 EUR [Min: 0.00, Max: 0.00]
NetLiquidation 739,675.04 EUR [Min: 739,584.78, Max: 739,962.39]
- Currency: USD Exchange rate: USD/EUR 0.739675
- Current values (received on: Mon 21 Jul 2014 14:52:29:995 [ Mon 21 Jul 2014 08:52:29:995 edt ]) -
AccruedCash 0.00 USD [Min: 0.00, Max: 0.00]
- Initial values (received on: Mon 21 Jul 2014 13:32:12:690 [ Mon 21 Jul 2014 07:32:12:690 edt ]) -
AccruedCash 0.00 EUR
AccruedDividend 0.00 EUR
BuyingPower 2,957,606.40 EUR
FullAvailableFunds 739,584.78 EUR
FullExcessLiquidity 739,584.78 EUR
FullInitMarginReq 0.00 EUR
FullMaintMarginReq 0.00 EUR
NetLiquidation 739,584.78 EUR
Current - Initial (elapsed: 1.34 hours)
Î AccruedCash 0.00 EUR
Î AccruedDividend 0.00 EUR
Î BuyingPower 0.00 EUR
Î FullAvailableFunds 90.26 EUR
Î FullExcessLiquidity 90.26 EUR
Î FullInitMarginReq 0.00 EUR
Î FullMaintMarginReq 0.00 EUR
Î NetLiquidation 90.26 EUR</code>
(not sure why Î NetLiquidation keeps fluctuating in time, while no orders are executed yet, but, apparently, so it is.)
and mixed with the methodological discussion, I will show the folio progress, the various fees and also show the details of all trades (which I can also provide at any time in form of an excel sheet with all details, to anyone interested).
"Rules" and assumptions
All orders are limit orders. Orders are made based on a set of automatic trading rules specified by the funds manager (called "scalping/hedging games"), which we will examine in detail during this thread. Fund manager intervention is possible at any degree to possibly supervise or adjust the programmed scalping/hedging game.
To "simulate" some of the possible "psychological interference" that might happen in the real world, I will assume an "emotional pain threshold" of 50%, which means that if the PNL reaches -50% of the initial "risk capital", our session is over. As M. Patel says in its book "Trading with Ichimoku...": "Emotions and trading don't go together. The emotional trader will ultimately become a losing trader - even with the supposed proper techniques and knowledge"
Therefore we will supervise our hedging action to stay within this constraints during the "load phases", but at the same time, and at the right time, "push" the investment to maximize the use of new scalped profits.
Technological setup
We will be using IB trading facility, which is a pretty good one.
I will simultaneously use a real account for data comparison and my own tests and the sim account for this test. We use the Gateway set up on post 7496 4001 being used by a real acct). Note that I can receive the same data both on the real account and the sim account because both instances are running on the same machine.
The trading application is my ongoing work (and obviously acts "on top" on their API layer, for executions aspects) and I will continue adding possible conceptual improvements during this thread (even if, at this point, it is quite "stable" from a technological point of view).
Initial folio
We will be dealing in this session with a folio of leveraged ETFs. But similar concepts will apply to futures. The initial folio is the following:
<code>
DGAZ STK SMART VELOCITYSHARES 3X INVERSE NA
ERY STK SMART_USD DIREXION DLY ENERGY BEAR 3X
FAS STK SMART_USD DIREXION DAILY FIN BULL 3X
FAZ STK SMART DIREXION DAILY FINL BEAR 3X
GDXJ STK SMART MARKET VECTORS JR GOLD MINER
NUGT STK SMART DIREXION GOLD MINERS BULL 3X
QID STK SMART PROSHARES ULTRASHORT QQQ
TBT STK SMART PROSHARES ULTRASHORT 20+Y TR
TNA STK SMART DIREXION DLY SM CAP BULL 3X
TZA STK SMART DIREXION DLY SM CAP BEAR 3X
UCO STK SMART PROSHARES ULTRA BLOOMBERG CR
UNG STK SMART US NATURAL GAS FUND LP
VXX STK SMART_USD IPATH S&P 500 VIX S/T FU ETN
</code>
NUGT, FAS are kept for the moment in "manual mode" (not traded), because they are blatant "repetitions" of other instruments. UNG is also kept manual, to take a look at it for a while before starting it. So we have initially 10 (out of 13) instruments in "auto" mode.
We start relatively small, using a fraction of the capital, with packets of 0.2% of 700K, scaled according to volatility. Later (in a few months) we will gradually ramp up to full usage of capital.
I will be discussing various hedging techniques, along the way, and will also show how to possibly mix the automated hedging action with various option configurations.
I am going to start a new thread with emphasis on hedge fund algorithmic (automated) management.
In this thread, we explore and refine in detail hedging techniques by making a complete exploration, with particular emphasis on:
- "Player superposition"
- Protective "option units"
We will also review and discuss systematically all the details of the scalping/hedging rules ("game"), including entries, exit and order sizing.
We have initiated this journey in previous threads, and here we will be continuing this development.
Constructive criticisms, conceptual contribution and new ideas are always welcome. As to destructive comments, trolling, or gratuitous discredit attempts, please keep them for yourself: we don't need them. If you feel compelled to promote your own projects within this thread, please do it properly, through a meaningful contrast of methodological approaches at a conceptual or implementation level (and avoiding insulting our work).
"Real world" expectations for results
To avoid the usual comments from some well known trolls (fortunately very few on this great site), coming out and interfering in the middle of an "investment phase", let me clearly say the following.
We are not expecting to get rich "overnight": this is systematic process of investment requiring patience and we may well expect to stay several weeks "underwater" before our "investment" starts showing results.
The equity curve will (typically) have a "cyclic" behavior, alternating load phases ("troughs") to return phases ("crests"). As the trading proceeds the load phases will be deeper and deeper, and the returns will periodically hit new higher watermarks. Each "cycle" may last several months (3 to 6 or more) and the cycle length may tend to grow over time. This will, in practice, mean that we may very well go 2-3 times "underwater" again, even if we previously reached pretty good profits, before (hopefully) remaining permanently "above water", in the next cycles.
The folio composition and the hedging techniques may "smooth" a bit the cyclic behavior, depending on how much investment is absorbed by single instruments and on instruments' leverage. Clearly, an ideal world situation would be to keep the allocation rather "uniform" across instruments, but that is not always achievable in practice, as the instruments themselves undergo periods of variable volatility with occasional "blasts" of very high volatility.
Account initial status
To avoid psychological "interferences" I will be using an Interactive Brokers' simulated account with the following initial situation (values received via API):
while the situation shown via API is the following (retrieved by the app, via API)
<code>ACCOUNT INFO from IB (Accounts in login: DU163281 Selected: DU163281)
============================================================ DU163281 =============================================================
Acct update event last received from IB: Mon 21 Jul 2014 14:52:29:995 [ Mon 21 Jul 2014 08:52:29:995 edt ]
- Currency: EUR Exchange rate: EUR/EUR 1.00
- Current values (received on: Mon 21 Jul 2014 14:52:29:995 [ Mon 21 Jul 2014 08:52:29:995 edt ]) -
AccruedCash 0.00 EUR [Min: 0.00, Max: 0.00]
AccruedDividend 0.00 EUR [Min: 0.00, Max: 0.00]
BuyingPower 2,957,606.40 EUR [Min: 2,957,606.40, Max: 2,957,606.40] (4.00 x 739,675.04)
FullAvailableFunds 739,675.04 EUR [Min: 739,584.78, Max: 739,962.39]
FullExcessLiquidity 739,675.04 EUR [Min: 739,584.78, Max: 739,962.39]
FullInitMarginReq 0.00 EUR [Min: 0.00, Max: 0.00]
FullMaintMarginReq 0.00 EUR [Min: 0.00, Max: 0.00]
NetLiquidation 739,675.04 EUR [Min: 739,584.78, Max: 739,962.39]
- Currency: USD Exchange rate: USD/EUR 0.739675
- Current values (received on: Mon 21 Jul 2014 14:52:29:995 [ Mon 21 Jul 2014 08:52:29:995 edt ]) -
AccruedCash 0.00 USD [Min: 0.00, Max: 0.00]
- Initial values (received on: Mon 21 Jul 2014 13:32:12:690 [ Mon 21 Jul 2014 07:32:12:690 edt ]) -
AccruedCash 0.00 EUR
AccruedDividend 0.00 EUR
BuyingPower 2,957,606.40 EUR
FullAvailableFunds 739,584.78 EUR
FullExcessLiquidity 739,584.78 EUR
FullInitMarginReq 0.00 EUR
FullMaintMarginReq 0.00 EUR
NetLiquidation 739,584.78 EUR
Current - Initial (elapsed: 1.34 hours)
Î AccruedCash 0.00 EUR
Î AccruedDividend 0.00 EUR
Î BuyingPower 0.00 EUR
Î FullAvailableFunds 90.26 EUR
Î FullExcessLiquidity 90.26 EUR
Î FullInitMarginReq 0.00 EUR
Î FullMaintMarginReq 0.00 EUR
Î NetLiquidation 90.26 EUR</code>
(not sure why Î NetLiquidation keeps fluctuating in time, while no orders are executed yet, but, apparently, so it is.)
and mixed with the methodological discussion, I will show the folio progress, the various fees and also show the details of all trades (which I can also provide at any time in form of an excel sheet with all details, to anyone interested).
"Rules" and assumptions
All orders are limit orders. Orders are made based on a set of automatic trading rules specified by the funds manager (called "scalping/hedging games"), which we will examine in detail during this thread. Fund manager intervention is possible at any degree to possibly supervise or adjust the programmed scalping/hedging game.
To "simulate" some of the possible "psychological interference" that might happen in the real world, I will assume an "emotional pain threshold" of 50%, which means that if the PNL reaches -50% of the initial "risk capital", our session is over. As M. Patel says in its book "Trading with Ichimoku...": "Emotions and trading don't go together. The emotional trader will ultimately become a losing trader - even with the supposed proper techniques and knowledge"
Therefore we will supervise our hedging action to stay within this constraints during the "load phases", but at the same time, and at the right time, "push" the investment to maximize the use of new scalped profits.
Technological setup
We will be using IB trading facility, which is a pretty good one.
I will simultaneously use a real account for data comparison and my own tests and the sim account for this test. We use the Gateway set up on post 7496 4001 being used by a real acct). Note that I can receive the same data both on the real account and the sim account because both instances are running on the same machine.
The trading application is my ongoing work (and obviously acts "on top" on their API layer, for executions aspects) and I will continue adding possible conceptual improvements during this thread (even if, at this point, it is quite "stable" from a technological point of view).
Initial folio
We will be dealing in this session with a folio of leveraged ETFs. But similar concepts will apply to futures. The initial folio is the following:
<code>
DGAZ STK SMART VELOCITYSHARES 3X INVERSE NA
ERY STK SMART_USD DIREXION DLY ENERGY BEAR 3X
FAS STK SMART_USD DIREXION DAILY FIN BULL 3X
FAZ STK SMART DIREXION DAILY FINL BEAR 3X
GDXJ STK SMART MARKET VECTORS JR GOLD MINER
NUGT STK SMART DIREXION GOLD MINERS BULL 3X
QID STK SMART PROSHARES ULTRASHORT QQQ
TBT STK SMART PROSHARES ULTRASHORT 20+Y TR
TNA STK SMART DIREXION DLY SM CAP BULL 3X
TZA STK SMART DIREXION DLY SM CAP BEAR 3X
UCO STK SMART PROSHARES ULTRA BLOOMBERG CR
UNG STK SMART US NATURAL GAS FUND LP
VXX STK SMART_USD IPATH S&P 500 VIX S/T FU ETN
</code>
NUGT, FAS are kept for the moment in "manual mode" (not traded), because they are blatant "repetitions" of other instruments. UNG is also kept manual, to take a look at it for a while before starting it. So we have initially 10 (out of 13) instruments in "auto" mode.
We start relatively small, using a fraction of the capital, with packets of 0.2% of 700K, scaled according to volatility. Later (in a few months) we will gradually ramp up to full usage of capital.
I will be discussing various hedging techniques, along the way, and will also show how to possibly mix the automated hedging action with various option configurations.
