Australian (ASX) Stock Market Forum

Dump it Here

1. PAPER TRADING Update VIX Strategy.jpg
2. Dashboard Capture.JPG




3. Line Capture.JPG




4. Open Summary Capture.JPG


DISCLAIMER
I want to make it clear that I'll be posting my trades for the purpose of tracking my own system, it's an educational exercise & it should not to be confused with running a signal service for others to follow. The format will be similar to my previous posts displaying the trades I intend to open and close well in advance keeping an accurate record of my progress for those interested in following the journey. The "Dump it here" thread is an educational thread & by displaying the progress of "Skate's Daily VIX Strategy" will hopefully help to educate others. So there is no confusion my intentions is for others to follow along not trade along.

Tomorrows Signals
Signals Capture.JPG

Skate.
 
@Skate, if you're just posting to track your own system - why not post the entries after the days close? Because regardless of whether you post a disclaimer, people will trade along with what you post. It's just human nature.

By posting after the days close, there is no chance for it to be used as a signal service, and you can still track and post your own results.

Just a thought.
 
@Skate, if you're just posting to track your own system - why not post the entries after the days close? Because regardless of whether you post a disclaimer, people will trade along with what you post. It's just human nature. By posting after the days close, there is no chance for it to be used as a signal service, and you can still track and post your own results. Just a thought.

@Cam019 I hear you loud & clear. The same issue has been raised before.

Posting signals in advance
The reason why I prefer to post the signals in advance is for beginners to understand the logic & in this way it demonstrates why the position is taken. Posting signals before the fact also alleviates others thinking that I have cherry-picked positions after the fact. Posting signals early indicates that there is no puffing of the results on my end.

After explaining my point of view
I've decided to take your advice. Others can view the "open position daily summary" if they are at all interested. Thanks for point this fact out as it's not my intention for others to trade along.

Skate.
 
Been following along avidly and once again thank you for the onslaught of information.
There aren't enough hours in the day for me to research and get on top of everything.
Curious as to why you don't combine strategies, and each one is independent?
Wouldn't finding confluence between different strategies help to yield better results?
If several strategies point toward similar stock, this should help remove some of the noise?
I can see that having too many variables can cause constriction, i guess it's like everything else - finding the happy balance of risk/reward.
 
View attachment 108120

@ducati916 I hear you loud & clear.

All posters contribute in their own particular way
The "Dump it here" thread is for the sharing of ideas in such a way to educate those starting out on their trading journey. @WilsonFisk posted some valuable information in his previous post that others should investigate as it's comments like his that give inspiration to us all. Some time ago the Duc dropped something similar about using the VIX that has been invaluable to me.

Posters are always looking for inspiration
It's good to see Peter is back posting, he's currently wondering "what trading idea to post about next" has got me thinking. I don't trade Daily strategies & to be truthful I consider it to be time-consuming. There is nothing better to spend less than 15 minutes a week trading, placing my orders over the weekend when it suits me. Imagine having to spend 15 minutes a day trading a daily strategy.

Being naturally lazy
I'm wondering if I have the stamina to trade day-in-day-out, but I'm willing to give it a go.

Skate's Daily VIX Strategy
This is the perfect strategy to kill two birds with one stone by putting a blow torch to the Duc's VIX idea & trading his idea on a daily basis. Peter made the comment "I post to keep myself engaged, focused and on track" so I intend to do the same. Another thing, posting & updating the daily progress of the "VIX Strategy" will keep the "Dump it here" thread active. Whereas some might like to check-in & watch the daily progress.

Skate.
View attachment 108042

Backtesting
I made a previous remark that I would resist posting backtest results. But for the evaluation of this Daily Strategy I'll make an exception. Maybe @willy1111 or @stafe may be kind enough to reproduce more accurate backtest results having Norgate's “Platinum subscription” when I upload the strategy (afl).


Backtest results from 1st January to 21st August 2020 (this calendar year)

View attachment 108043 View attachment 108044

Skate.

Hi guys

Out of interest i ran this system over Norgates full database, since it hasn't been done yet.

I used the code as is and i have not been through skate's code to check it, i just added the relevant code snippets to test using Norgates historical capabilities.

Code:
OnLastTwoBarsOfDelistedSecurity = BarIndex() >= (LastValue(BarIndex()) -1) AND !IsNull(GetFnData("DelistingDate"));
OnSecondLastBarOfDelistedSecurity = BarIndex() == (LastValue(BarIndex()) -1) AND !IsNull(GetFnData("DelistingDate"));


Buy = cond1
      AND cond2
      AND cond3
      AND cond4
      AND cond5
      AND cond6
      AND NorgateIndexConstituentTimeSeries("$XAO") // see if the symbol is part of the All ords at the time when a signal is generated
      AND NOT OnSecondLastBarOfDelistedSecurity ; // don't enter if on second to last bar before delisting
//=================================================================================
//5. Add a sell condition
//=================================================================================
Sell = C < MA( C, 50 ) AND NoStrength AND NoUpTrend OR OnLastTwoBarsOfDelistedSecurity; // Exit if security has been delisted during open position

This is the tests from 2005 - now

upload_2020-8-24_19-57-34.png


upload_2020-8-24_19-58-26.png

Others can cross check if they have time.
 
Curious as to why you don't combine strategies, and each one is independent?

@Fury I have made over 200 posts explaining one of my trading strategies (the HYBRID Strategy) that does exactly what you are suggesting. The Hybrid is a 40 position Strategy combinating 3 of my best performing strategies. Each strategy works independently of each other but all 3 totally work in conjunction with each other. Another is my "PANDA Strategy".

Skate.
 
Hi guys
Out of interest i ran this system over Norgates full database, since it hasn't been done yet. I used the code as is and i have not been through skate's code to check it, i just added the relevant code snippets to test using Norgates historical capabilities. Others can cross check if they have time.
@Roller_1 I can't dispute your findings as I don't have access to Norgate's Platimum Subscription Package. The results look pretty ordinary & I would appreciate if someone else could verify your results.

Strategies Uploaded
All the strategies I've uploaded are from my original 2015 Amibroker template that tested code snippets in my early days of learning. The templates served me well & it's why I'm sharing them as they are perfect for new Amibrokers users to start out with. I've commented the lines of code so it's much easier to understand. FYI, I don't trade any of the strategies uploaded. They are for learning purposes only.

Skate.
 
@Skate is this line correct ? as the comment does not reflect the logic.

Sell = C < MA( C, 50 ) AND NoStrength AND NoUpTrend; // Sell when the close is less than the moving average of the last 50 Days with the closing price is less than the Simple Moving Average of the last 12 Days or Sell when there is NoUpTrend as the trend has ended

As when I tested your code over the same dates as you I found that I could not replicate your number of trades and that only 2 of my trades exited from the above logic, the rest (36) exited due to the trail stop.
 
Daily Vix Logo.jpg

Paper Trading uploads
The paper trading reports I upload at the end of each week are refined, mature strategies that I have traded previously, admittedly with different parameter settings. The "Daily VIX Strategy" is completely new & I'm excited to see if this strategy will perform. Moreover will I have the motivation to stick with trading & reporting the results each day. I need to have the fortitude of @bigdog who never misses reporting every morning.

Trading a daily periodicity
After reading a few different threads it got me thinking about trading a daily strategy. It's been over 4 years since trading on a daily basis & I have a couple of excellent strategies if I wanted to start again. When travelling it was hard to trade each day. With COVID-19 the lack of time is no longer an issue.

Stepping up the idea
If I can use the "VIX" as an indicator successfully why can't I use it as a trading strategy. "Skate's Daily VIX strategy" has been a work in progress for over 5 months to get the VIX to perform as a daily strategy. On paper this strategy is a great performer but I'm more interested to see if it could handle trading in the pre-auction mimicking the way I trade using pyramid dollar position sizing. Only time will tell.

Skate.
 
@Skate is this line correct ? as the comment does not reflect the logic.
Sell = C < MA( C, 50 ) AND NoStrength AND NoUpTrend; // Sell when the close is less than the moving average of the last 50 Days with the closing price is less than the Simple Moving Average of the last 12 Days or Sell when there is NoUpTrend as the trend has ended. As when I tested your code over the same dates as you I found that I could not replicate your number of trades and that only 2 of my trades exited from the above logic, the rest (36) exited due to the trail stop.
@Trav. the "AND" statement is designed to keep you in the trade as long as possible an "OR" statement would be ineffective.

Play with the sell statement
If you don't like the sell statement (as is) you could use only the primary sell condition only [Sell = C < MA( C, 50 );] or you could just use the Trailing Stop as the exit. If you use the Trailing Stop (ONLY) the TS needs to be extended to keep the trade active as long as possible when the Index Filter is TRUE.

Skate.
 
@Skate all good mate, I was just interested to see why the results didn't match and with the high strike rate on the trail stop, which sort of made the sell line redundant hence the question.
 
Just a heads up of some potential backtesting error I saw in post https://www.aussiestockforums.com/posts/1089878/

cond3 = C >= 0.05; // Buy only if the closing price is greater $0.05 (5 cents)
cond4 = C <= 10; // Buy only if the closing price is less than $10.00
Every time you do comparisons of Close with absolute numbers you should use the unadjusted Close. I rememeber I was bitten by this slight error back when I was backtesting using PremiumData and couldn't believe the good results I got. Although to be fair my ranking algorithm was also affected by this error as I was ranking by 1/C and I was backtesting Russell 3000 which I guess has many more splits and adjustments than AU stocks.

I think the liquidity filter is affected as well by this.
 
@Roller_1 I can't dispute your findings as I don't have access to Norgate's Platimum Subscription Package. The results look pretty ordinary & I would appreciate if someone else could verify your results.

Strategies Uploaded
All the strategies I've uploaded are from my original 2015 Amibroker template that tested code snippets in my early days of learning. The templates served me well & it's why I'm sharing them as they are perfect for new Amibrokers users to start out with. I've commented the lines of code so it's much easier to understand. FYI, I don't trade any of the strategies uploaded. They are for learning purposes only.

Skate.

No worries, have you thought about getting the platinum it's less than $300 extra and would be good for verification/ validation of your new daily strategies that you are firing up. Especially when the market turns again. This year you could chuck a tight index/momentum filter on anything to avoid the crash and have big results in the reversal.
 
Hi @soso can you explain this a little more for us noobs? Is "unadjusted close" a different field?

Consider stock ABC has Closing price 20 on 01.01.2019. In 01.01.2020 you have a stock split 1:4, if you are using standard Norgate adjustments for capital events & splits (and you should) then the back price is adjusted so you don't have gaps. So during backtest the price on 01.01.2019 will be 5 (20/4).

This is fine in most situations & indicators as MA, ROC etc are not affected because the whole time series is adjusted proportionally. But if you use absolute price in backtest comparisons, like a condition Buy = Buy AND C < 10, then you should use unadjusted prices (the exact price you see if you were trading that day) otherwise backtest is not realistic. In example above the condition is triggred, but in real life won't be triggered because the real price is 20, not 5. Hope it's clear.

I think Volume is affected as well.
 
Hi Skate,
I am quite new at this and am trying to teach myself AFL and also how to develop strategies. Hence I decided to use your code for the weekend trader as learning exercise.

I have a few questions about your code
1. In your code at line 17 what is the purpose of the 2 lines?
SetForeign( "$XAO.au", True , True );
RestorePriceArrays( True );
Aren't these lines redundant as in line 23 is
Index = Foreign("XAO","C",True);

2. Line 36 is
MOMFilter = ( ROC( C, 10 ) >= ROCParameter );
shouldn't it be?
MOMFilter = ( ROC( C, 10 ) >= ROC( C, ROCParameter) );

3. Finally, what is the purpose of the variable TradingFunds which was set to default value of 5000?
Isn't the position size determined by the current equity divided by the maximum number of positions?
ie
PosQty = 20; // Position Quantity = Maximum 20 positions
PositionSize = -100 / posqty;

Please pardon me if my questions are basic.
Thanks for your feedback.
Stafe

@stafe if you read back a few posts your concerns have already been addressed. I'll refrain from uploading backtest results as I don't have Norgate's “Platinum subscription” only the "Silver" & I didn't realise the huge difference between the results over a short period of time.

It worth repeating
Without Norgate's “Platinum subscription” backtesting is less than reliable.

Backtest 2 - Making use of Historical Index Constituents
Platinum users of Norgate data are able to make use of Historical Index Constituents https://norgatedata.com/amibroker-usage.php This means that before a trade is taken the software checks to see it is in the relevant index at the time the trade is entered. This backtest I ran on watchlist All Ords (502 matching symbols) but included code to ensure the stock was in the All Ords at the time the trade was entered. https://www.aussiestockforums.com/posts/1088553/

This is @willy1111 Backtest results (using Norgate's “Platinum subscription”)

View attachment 107956


The previous post is worth repeating
“@willy1111 thank you for doing this backtest for me. Looking at the comparison between the backtests with & without (Norgate's Index Constituent) the results are "chalk & cheese", being miles apart. The backtest results confirm it pays to have the Norgate's Platinum subscription when developing a new strategy

“@CNHTractor your follow up post confirms @willy1111 sentiment about the inaccuracies of backtest results when you are not using Norgate's historical index constituents. Note to self, "refrain from posting backtests in the future

So you have the adjusted version of the WTT Strategy
I have uploaded the most recent version of the "WTT Strategy" just for you.

FYI
The version that I'm paper trading "Skate's Version of the WTT Strategy" bears little resemblance to the strategy uploaded.

Skate.
 
Hi Skate, I have a few questions about your code

1. In your code at line 17 what is the purpose of the 2 lines?
SetForeign( "$XAO.au", True , True );
RestorePriceArrays( True );
Aren't these lines redundant as in line 23 is
Index = Foreign("XAO","C",True);

2. Line 36 is
MOMFilter = ( ROC( C, 10 ) >= ROCParameter );
shouldn't it be?
MOMFilter = ( ROC( C, 10 ) >= ROC( C, ROCParameter) );

3. Finally, what is the purpose of the variable TradingFunds which was set to default value of 5000?
Isn't the position size determined by the current equity divided by the maximum number of positions?
ie
PosQty = 20; // Position Quantity = Maximum 20 positions
PositionSize = -100 / posqty;

Please pardon me if my questions are basic.
Thanks for your feedback.
Stafe

@stafe the uploaded (AFL's) are my old templates from 2015 to help others new to Amibroker understand the code with comments. The (AFL's) are uploaded for educational purposes & are not guaranteed to be error-free. The (AFL's) give others something to play with. The "WTT" Template hasn't been uploaded for others to trade.

Copy of the code
So others can follow your question & my answers I've pasted the code in question.

Question 1 - "In your code at line 17 what is the purpose of the 2 lines? - Aren't these lines redundant as in line 23"
Line 17 & Line 23 seem similar & admittedly with line 23 (that is part of the Index Filter) line 17 becomes repetitive & redundant - "until" you you decide to "comment out" the Index Filter to run alternative backtests.

Question 2. "Line 36 is MOMFilter = ( ROC( C, 10 ) >= ROCParameter ); shouldn't it be? MOMFilter = ( ROC( C, 10 ) >= ROC( C, ROCParameter) );"
Line 37 references Line 36 which is an adjustable parameter setting. The reason I used the "param" feature is so others can change this setting of the fly when backtesting. The line of code without the param is: MOMFilter = ( ROC( C, 10 ) >= 8 ) This simply means when the "Rate of Change" of the last 10-period is greater than or equal to the 8-period "Rate of Change" there is momentum that becomes part of the "buy" strategy.

Question 3. "Finally, what is the purpose of the variable TradingFunds which was set to default value of 5000? Isn't the position size determined by the current equity divided by the maximum number of positions? ie PosQty = 20; // Position Quantity = Maximum 20 position PositionSize = -100 / posqty;"
Line 10 is an adjustable parameter setting. I've used the "param" feature so if $5k bets is "not the size you want to backtest" you simply have a means to adjust the bet size on the fly without changing any of the code.

Why have the bet size adjustable?
Scenario (1)
I prefer $25k bets so I would change $5,000 with $25,000 in the parameter settings before running the Exploration analysis. Changing this amount recalculates the correct number of shares to purchase in the pre-auction. Also by changing the bet size it also calculates the amount being invested in each position as a double-check.
Scenario (2) Those trading the "Action Strategy" are limited to $1k bets (so I would change $5,000 with $1,000 in the parameter settings before running the Exploration analysis). Changing the bet size recalculates the correct number of shares to purchase in the pre-auction. ($5k bet size relates to the code you referenced). Also by changing the bet size it also calculates the amount being invested in each position as a double-check.

_SECTION_BEGIN( "# Skate's WTT Modified Exploration" );

//=================================================================================
//1. The "SetOptions" are management options & they are a feature of Amibroker
//=================================================================================
Line 10 - TradingFunds = Param( "Trading Funds - $", 5000, 1000, 10000000, 1000 ); // User-definable parameter, accessible via Exploration parameters - changes are reflected immediately. (Default $5k bets) - INSERT any amount
SetOption( "InitialEquity", 100000 ); // $100k Inital Equity (allows for 20 X $5k bets)
SetOption( "PriceBoundChecking", 1 ); // True: Adjust prices so that they fall within the High-Low range
SetOption( "CommissionMode", 2 ); // Use $ amount
SetOption( "CommissionAmount", 19.95 ); // CommSec commission rate
SetOption( "UsePrevBarEquityForPosSizing", 1 ); // True: Use previous bar closing equity to perform position sizing
SetOption( "AllowSameBarExit", False ); // False: Trade is exited & we move to next bar ignoring other signals
Line 17 - SetForeign( "$XAO.au", True , True ); // I've used the new Norgate Updater (NDU) format - change if the format is different to your data supplier
RestorePriceArrays( True ); // Restores original price and volume arrays after the call to SetForeign.
SetTradeDelays( 1, 1, 1, 1 ); // Trade delays, the delay is required for backtesting
//=================================================================================
//2. The "Index Filter" - decides when we will trade & also our trailing stop levels
//=================================================================================
Line 23 - IndexCode = ParamStr("Index Symbol","$XAO.au");
Index = Foreign(IndexCode,"C");
MAFilter = MA( C, 10); // 10 week lookback period
IndexBuyFilter = Index > MAFilter; // Index Filter = ON: When the close is greater than the 10 week simple moving average the Index Filter is ON [trailing stop set to 20%] + [buy + sell signals generated]
IndexSellFilter = Index < MAFilter; // Index Filter = OFF: When the close is less than the 10 week simple moving average the Index Filter is OFF [shortens trailing stop to 10%] + [only sell signals generated]
RestorePriceArrays( True ); // Restores original arrays after the call to SetForeign.
//=================================================================================
//3. Add all our other filters
//=================================================================================
Liq = C * V; // Liquidity Filter
CV = 500000; // Volume Filter
Liqfactor = Liq > CV; // Liquidity Filter
ROCFilter = ROC( C, 20 ) > 30; // Rate Of Change (ROC) Momentum filter
Line 36 - ROCParameter = Param( "ROC Parameter", 8, 0, 52, 1 ); // 8 week Rate of Change period
Line 37 - MOMFilter = ( ROC( C, 10 ) >= ROCParameter ); // Momentum filter - the closing price of the last 10 weeks is greater than the last 8 weeks
NoStrength = Close < MA( Close, 12 ); // If the closing price is less then the Simple Moving Average of the last 12 weeks it's considered there is no strength in the move
//=================================================================================
//4. Add a Buy condition
//=================================================================================
WTTBP = Param( "Breakout Period", 10, 1, 1000, 1 ); // 10 week Lookback period

Cond1 = C > Ref( HHV( C, WTTBP ), -1 ); // Buy when the closing price is greater than the highest High Value of the last 10 weeks
Cond2 = IndexBuyFilter; // Buy ONLY when the Index Filter is ON
cond3 = C >= 0.05; // Buy only if the closing price is greater $0.05 (5 cents)
cond4 = C <= 10; // Buy only if the closing price is less than $10.00
cond5 = liqfactor; // Buy only when the Liquidity filter is TRUE
cond6 = ROCFilter AND MOMFilter; // Buy only when the Rate of Change filter & Momentum filter is TRUE

Buy = cond1
AND cond2
AND cond3
AND cond4
AND cond5
AND cond6;
//=================================================================================

Skate.
 
Top