Forum Replies Created
-
AuthorPosts
-
ScottMcNabParticipant
So many ways to make errors with the code….once I’ve made them all I forget some and start working through the list again
ScottMcNabParticipantNo Leverage Julian..I got a bit of a kicking in both April and May so performance was due to revert …was a relief tbh
ScottMcNabParticipantAnd in the test that concerns you it was ?
FPAmount = iif(MarketStrength>50,20,20)
SetPositionSize(Ref(FPAmount,-1),spsPercentOfEquity);and the results didn’t match with ?
SetPositionSize(20,spsPercentOfEquity);
ScottMcNabParticipantAre you able to post the code Terry? One of the stronger coders here might be able to shed some light in case we are doing something wrong
ScottMcNabParticipantJun 2021
MRV RUA 2.0%
MRV RUI 3.5%
MRV USA RB 5.3%
MRV USA AK 6.0%
MRV USA PB -5.8%
MRV USA SM 4.8%ScottMcNabParticipantHi Terry. Based on past experience I am probably incorrect but hopefully I can learn something here…when I run the code with a PS multiplier to reduce PS in high vola the only thing that seems to happen is the number of shares for the stock with high vola is halved….so PS goes from 10% to 5%…not from 10% to 20%….I have done other test using HVola this time and compared it to my live results (the first table posted)….the trades taken are the same but some of the stocks just have the number of shares halved
code used for PS in this example:
HVola = 100 * StDev(log(C/Ref(C,-1)),10) * sqrt(252);
PSMult = IIf(HVola>30,0.5,1);
PS = 10*PSMult;SetPositionSize(Ref(PS,-1),spsPercentOfEquity);
ScottMcNabParticipantI just tried another quick test Terry
first is with:
SetPositionSize(10,spsPercentOfEquity);this next one is using:
PS = IIf(Name()==”NUE” OR Name()==”UAA”,5,10);SetPositionSize(Ref(PS,-1),spsPercentOfEquity);
ScottMcNabParticipantHave you tried that code snippet ? I am not sure why it would work with my afl and not yours
ScottMcNabParticipantsomething along this line Terry (eg 10 positions at 10%)?
HighVola = HVola>90 OR PercentRank(HVola,200)>95;
PSMult = IIf(HighVola,0.5,1) ;
PS = 10*PSMult;SetPositionSize(Ref(PS,-1),spsPercentOfEquity);
ScottMcNabParticipantAre you using adjusted or unadjusted close for the ranking Taranveer? There is a risk of a look ahead error. This also impacts atr so it would also need to be adjusted I believe. In practical terms, stocks that are going to be successful in the future and run up in price ( and undergo split(s) ) would be selected preferentially (and incorrectly) in the backtest if ranking ROC/atr or ROC/C were used….. giving a backtest with potentially unrealistic results (as the denominator would be made smaller when adjusted for the split I think).
so I dont think that atr as a percentage of close downgrades performance as such but rather it removes the look ahead error ?
ScottMcNabParticipantCheers Terry. I have always wondered what would happen in the “Flash Crash” type of situation too when using 4x leverage…if IB algo would just start closing margin positions automatically such that then miss the bounce…i seem to vaguely remember about it checking at different times during the day..
ScottMcNabParticipantTerry Dunne wrote:A bit of an early morning slap Nick, but these things happen. Somebody wise might say “…next 1,000 trades…”
However, it does reinforce my ‘issue’ with shorting…this is exactly the thing that I have been fretting about, not specifically AMC, but generally. I know I’ll lose some diversification but I’m strongly considering canning my short systems. I just don’t like the unlimited risk.
Ironically, given the discussion on my progress journal, this is much more annoying to me than the (in my opinion) much smaller risk of some huge market wide one day down move. I know there is Black Monday, but even the Flash Crash rebounded on the day.
Hi Terry…is there the possibility that IB will start auto liquidating positions at the bottom of the crash before rebound ?
ScottMcNabParticipantHey Julian …interested to hear your thoughts on whether you feel the difference enough (based on sample size) that you would run the 2 different systems differently ?
ScottMcNabParticipantSeems I am in minority….been a while since I looked at it so I better go back and test again…I have developed some markedly different systems in last few months compared to the ones used over the last few years so may be quite different
ScottMcNabParticipantI was having a crack at sub $1 stocks in that one system …knew were risks…had volume and turnover in the millions but not (yet) enough so will keep experimenting
-
AuthorPosts