Forum Replies Created
-
AuthorPosts
-
Stephen JamesMember
Response from AB, Julian:-
No, you can’t code that, but you can save your Analysis project (File->Save As…)
instead of just saving formula.
Analysis project contains ALL settings AND formula in one file.Save as an apx file.
Craig
Stephen JamesMemberNo that I’m aware of or could find Julian.
I’ve emailed AB as it would be helpful. Will let you know their response if it is anything besides ‘no’.Stephen JamesMemberAB have recommended using P&A for rotational systems due to the way the ranking is processed in regard to the first symbol in the watchlist being tested. It will give erroneous results if that symbol does not have full data history for the test period. This was a recent development after noticing a small number of trades being held past rotation dates when testing certain watchlists.
You can use any symbol for P&A so long as it has full data history, but I’d suggest it needs to make sense for your system and universe being tested.
Do not use P&A for other systems. It can skew some indicators.
August 30, 2017 at 7:08 am in reply to: Selection bias – how much is too much and general MOC discussion #107499Stephen JamesMemberYes Scott,
PositionScore takes an abs value.
What are you trying to do exactly?April 29, 2017 at 11:36 pm in reply to: Coding a Close higher than the Highest High of the last 2 days #106733Stephen JamesMemberI suspect the # trade bars discrepancy is due to the fact that the backtest report returns # trading days between entry and exit, but the stock in question has had a trading halt and the actual bars in trade was correct.
Stephen JamesMemberCreate a separate watchlist for the 0.05 symbols and round the limit order price with tick size:-
Tick = IIf(InWatchList(insert watchlist number),0.05,0.01);
You could also use the InWatchListName function.
Stephen JamesMemberApril 17
Content updated in the following areas, mostly in regard to the new Norgate functions and NDU data, some to clarify some regular questions:-
S = section, M = module
S1, M2 – Data Installation
S1, M4 – Symbols
S1, M4 – Watchlists
S2, M11 – Price Filters
S2, M11 – Liquidity Filters
S2, M11 – Index & Universe Filters
S2, M13 – Looping
S2, M14 – Lesson 3
S2, M15 – Adding Overlays
S2, M15 – Code checking
S2, M16 – Interpretation Window
S2, M17 – Settings
S2, M17 – System Completion
S2, M18 – Historical Constituents
S2, M18 – Optimization
S2, M18 – Delisted StocksStephen JamesMemberLooks like business days (ASX) Scott:-
Stephen JamesMemberThe watchlist only provides a list of the symbols that have been or are in an index. It alone does not tell us when a symbol was in the index.
The NorgateIndexConstituentTimeSeries code returns 1(true) or 0(false) for each bar (1 when the symbol is a member of the index, 0 when not).
Therefore it can tell us if the symbol was in the index at the time of a signal. That is a distinct difference to just a list of symbols.
Stephen JamesMemberStephane
The watchlists ‘Current and Past’ for the NDU data provide a list of symbols that were or are a member of a given index at any point in time.
The code NorgateIndexConstituentTimeSeries or the old IsIndexConstituent identifies that the symbol was in the index at the time of a signal (buy or setup, depending how coded).Is that what you mean?
Stephen JamesMemberThis might help
Code:TO = Volume*Close;InitialTO = Param(“Initial Turnover – $”,700000,0,10000000,1000);
StartYear = Param(“Start Year”,1995,0,2020,1);
TOInc = Param(“Turnover Increment”,1.03,0.01,10,0.01);
Inc = TOInc ^ Max(0,Year()-StartYear);
IncTO = InitialTO * Inc;Stephen JamesMemberScott
Any AB indicators are going to reference the adjusted close unless you code it otherwise, but using the unadjusted close would distort the indicator.Stephen JamesMemberLuke
The second piece of code from the LMS lets you switch between adjusted and unadjusted close. The first does not and it also uses PF twice – the second use normally overrides the first.
I have posted some filters with volume/turnover here:-
Changes will be made to the LMS content shortly.
Stephen JamesMemberHere’s some price and volume filters I knocked up until I get to changing course content. The unadjusted series are arrays so it seems no problem to apply averages. If anyone finds any issues, please let me know.
Code:#include_once “FormulasNorgate DataNorgate Data Functions.afl”_SECTION_BEGIN (“Optional Price & Volume Filters”);
//=================================================================================
//Optional Price & Volume Filters
//=================================================================================
CloseToggle = ParamToggle(“Close Price”,”Adjusted|Unadjusted”,0);
CloseArray = IIf(CloseToggle,NorgateOriginalCloseTimeSeries(),Close);VolumeToggle = ParamToggle(“Volume”,”Adjusted|Unadjusted”,0);
VolumeArray = IIf(VolumeToggle,NorgateOriginalVolumeTimeSeries(),Volume);
//———————————————————————————
PriceTog = ParamToggle(“Price Filter”,”Off|On”,0);
MinSP = Param(“Minimum Share Price – $”,5,0.00,1000,0.01);
MaxSP = Param(“Maximum Share Price – $”,100,0.00,2000,0.01);
MinMaxSP = CloseArray >= MinSP AND CloseArray <= MaxSP; PriceFilt = IIf(PriceTog,MinMaxSP,1); //--------------------------------------------------------------------------------- TOTog = ParamToggle("Turnover Filter","Off|On",0); Turnover = CloseArray*VolumeArray; MinTO = Param("Minimum Turnover - $",300000,0,10000000,1000); TOMA = Param("Turnover MA",5,1,200,1); AveTO = MA(Turnover,TOMA); TOFilter = AveTO > MinTO AND Turnover > MinTO;
TOFilt = IIf(TOTog,TOFilter,1);
//———————————————————————————
VolTog = ParamToggle(“Volume Filter”,”Off|On”,0);
MinVol = Param(“Minimum Volume”,300000,0,10000000,1000);
VolFilter = VolumeArray > MinVol;
VolFilt = IIf(VolTog,VolFilter,1);
//———————————————————————————
AveVolTog = ParamToggle(“Average Volume Filter”,”Off|On”,0);
MinAveVol = Param(“Minimum Average Volume”,500000,0,10000000,1000);
AVPer = Param(“Volume EMA”,50,1,200,1);
AveVol = EMA(VolumeArray,AVPer) > MinAveVol;
AveVolFilt = IIf(AveVolTog,AveVol,1);
//———————————————————————————
OptFilt = PriceFilt AND TOFilt AND VolFilt AND AveVolFilt;//=================================================================================
_SECTION_END();Stephen JamesMemberI’ll most likely add some content around the volume in the next week or so Len after I’ve had a closer look at all the changes.
-
AuthorPosts