Home › Forums › Trading System Mentor Course Community › AmiBroker Coding and AFL › Optional Filters
- This topic is empty.
-
AuthorPosts
-
November 14, 2019 at 2:09 am #101952MichaelRodwellMember
Hi all,
Regarding optional filters, what is the correct useage?
Adjusted vs Unadjusted for what scenario?
At the moment when I apply the filters Im getting a few results in my back test that are slipping through and not sure why.
Thanks
Mke
November 14, 2019 at 4:52 am #110569Stephen JamesMemberAdjusted for day to day management (explorations on last bar of data etc).
Unadjusted for backtesting and older data.February 8, 2020 at 2:19 am #110572#REF!McGrathParticipantWhen I run a backtest for the month to compare against the exploration results I have 1 stock that is showing in the backtest which is not in the exploration. I am using a price filter of min $20 & Max $1000. I am using unadjusted closing price.
This stock that is showing has a price of $16.70. This stock should not be showing as the min price is $20. My watchlist is R1000 current & past.
any ideas?
February 8, 2020 at 6:50 am #110923AnonymousInactiveA couple of ideas….
1. You have a system which has already decided to buy this stock at the next open. The methodology in your system is “Buy at next open price”. Today’s close is $22, so it still fits within the parameters of exploration to buy at next open. Overnight stock price dips, and actually it opens next session at $16.70. System would still assume you would take that buy as the filter condition on the day before at $22 was still met.
2. Similar to first idea… Today stock is trading at $21, but your limit buy order you have set up for tomorrow is at $16.70. Next session runs, low of the day drops down to $15, you get the fill at $16.70.
February 8, 2020 at 6:59 am #110924AnonymousInactiveAlso don’t forget stock splits. Perhaps the day before it was at $33.40 and got a 2 for 1 stock split overnight so now its running at $16.70.
February 8, 2020 at 9:36 pm #110925#REF!McGrathParticipantThe stock NLOK announced a special dividend of $12 per share payable on the 31/1/20. The exploration on the 31/1/20 using adjusted data excludes the stock. I run the backtest from the 31/1/20 to 3/2/20 so on an unadjusted basis the stock is included.
February 8, 2020 at 11:41 pm #110926AnonymousInactiveRemember that a backtest for today’s date would show trades which have run off the back of the exploration you ran on the day before.
Therefore a backtest starting on 31/1/20, assuming there are some trades on 31/1/20 would actually be from an exploration you ran on the data of 30/1/20.
So a backtest from 31/1/20 to 3/2/20 would correspond with explorations you would have run for the dates of 30/1/20 to 2/2/20.
Also don’t forget of these example dates you have given, only 30 and 31 Jan are actual trading days. The backtest on the date range you gave would only show one actual trading day of results for Friday 31 Jan.
If it is that you are seeing the trade of NLOK on Friday 31st Jan, perhaps run the exploration for Thursday 30th Jan and see if it comes up as a buy.
February 9, 2020 at 8:40 pm #110927#REF!McGrathParticipantMatthew, this is a monthly rotation system so I run the exploration on the last trading day of the month (after the close). Orders then entered for the first trading day of the next month (3/2/20).
I contacted Norgate in relation to adjusted & unadjusted data. They advised:
Open NDU’s “Data Viewer”.
Click on Tools > Data Viewer and select the Database “US Equities”. Then enter NLOK in the “search by symbol” box.
To flip between adjustment methods, click on Data Configuration > Stocks.
If you select “No adjustment”, you’ll see that the original (unadjusted) Close on Jan 31 was $28.42. If you elect to adjust for “Capital reconstructions and special distributions”, you’ll see that the adjusted Close on Jan 31 was $16.42.
To understand how adjustments are made, see the FAQ – When it comes to Price & Volume Adjustment for stocks, what events count as “Capital reconstructions” and “Special Distributions”?
https://norgatedata.com/ndu-faq.php#pricevoladjustsFebruary 10, 2020 at 1:16 am #110936AnonymousInactiveBrilliant! That’s a good tip to know!
-
AuthorPosts
- You must be logged in to reply to this topic.