investor behavior

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #59247 quote
    JohnScher
    Participant
    Veteran

    I am concerned with the question of how investor behaviour behaves.

    In a simple code below, I have found with the 4H timebase that Monday morning investor behavior is different than Tuesday morning, compare the attachments.

    If I set the time base to 4H, the result is much better.

    I have the assumption that on certain weekdays and weekdays people have different investor behaviour at certain times.

    I’d like to use that in trading.
    So I wanted to ask whether someone here, or someone else, has an indicator or is able to program an indicator that, similar to the seasonal patterns from the Pathfinder system, reflects the timebased patterns during the week in investor behavior.

     

    P. S. The main code is the “negative”, i. e. the short version of the “DailyOpenLong”, which lives from the RepulseStop in a way that is not generally recognized.

     

    First : Storm with timebase, german time, gmt +1, Dax 1 Euro 4H

    Second (next post): Storm without timebase, german time, gmt +1, Dax 1 Euro 4H

     

    Please check it yourself.

     

     

     

    //-------------------------------------------------------------------------
    // Maincodce STORM ... ShorT On Rising Markets
    // 4H Short Repulse Timebased
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Haupttode : 4H Short Repulse
    //-------------------------------------------------------------------------
    // Dax 1 Euro Mini
    // TimeFrame 4H
    // maincode: 4H Short with Repulse-Stop
    // created by JohnScher
    
    //
    defparam flatafter = 210000
    defparam cumulateorders = true
    
    
    
    Once position = 1
    
    c1 = cci [21] (close) >-95 // to get out some special situations
    c2 = TR (close) >24 // nice condition
    c3 = repulse [3] (close) <0.1 // mine
    
    
    
    t1 =  dayofweek = 1 and time = 130000 // timebase
    t2 =  dayofweek = 1 and time = 170000 // timebase
    t3 =  dayofweek = 2 and time = 090000 // timebase
    t4 =  dayofweek = 2 and time = 130000 // timebase
    t5 =  dayofweek = 3 and time = 130000 // timebase
    t6 =  dayofweek = 4 and time = 090000 // timebase
    t7 =  dayofweek = 4 and time = 130000 // timebase
    t8 =  dayofweek = 5 and time = 090000 // timebase
    
    TradingTimeShort = t1  or t2 or t3 or t4 or t5 or t6 or t7 or t8  
    
    IF TradingTimeShort Then
    IF c1 and c2 and c3  Then
    IF Exponentialaverage [1] (close) < ExponentialAverage [4] (close) THEN
    sellshort position CONTRACTS AT MARKET
    Endif
    Endif
    Endif
    
    
    If repulse [3] (close) >0.1 then
    Exitshort at market
    Endif
    
    // not tested
    // on other major indizes
    // with Seasonalpatternmultipler from Pathfinder-Systems
    // with some Re-invest-Stategies
    
    
    // greets JohnScher
    

     

     

     

    Translated with http://www.DeepL.com/Translator

    Storm-1.png Storm-1.png Storm-2.png Storm-2.png Storm-3.png Storm-3.png
    #59251 quote
    JohnScher
    Participant
    Veteran

    And here without timebase

     

    //-------------------------------------------------------------------------
    // Maincodce STORM ... ShorT On Rising Markets
    // 4H Short Repulse Timebased
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Haupttode : 4H Short Repulse
    //-------------------------------------------------------------------------
    // Dax 1 Euro Mini
    // TimeFrame 4H
    // Haupttode : 4H Short with Repulse-Stop
    // treated by JohnScher
    
    // tested 08.04.2013 - 26.11.17 with PRT 10.3
    // 2 Points Spread
    // won 161 loose 212
    // max DrawDown 853 Euro max RunUp 5.035
    // winnings total 4,473 Euro
    
    
    defparam flatafter = 210000
    defparam cumulateorders = true
    
    
    
    Once position = 1
    
    c1 = cci [21] (close) >-95
    c2 = TR (close) >24
    c3 = repulse [3] (close) <0.1
    
    
    
    TradingDayShort = dayofweek = 1 or dayofweek = 2 or dayofweek = 3 or dayofweek = 4 or dayofweek = 5
    TradingTimeShort = time = 090000 or time = 130000 or time = 170000
     
    If TradingDayShort and TradingTimeShort Then
    IF c1 and c2 and c3  Then
    IF Exponentialaverage [1] (close) < ExponentialAverage [4] (close) THEN
    sellshort position CONTRACTS AT MARKET
    Endif
    Endif
    Endif
    
    
    If repulse [3] (close) >0.1 then
    Exitshort at market
    Endif
    
    // not tested
    // on other major indizes
    // with Saisonalpatternmultipler from Pathfinder-Systems
    // with some Re-invest-Stategies
    
    // greets JohnScher
    
    Storm-without-1.png Storm-without-1.png Storm-without-2.png Storm-without-2.png Storm-without-3.png Storm-without-3.png
    #59273 quote
    GraHal
    Participant
    Master

    Weren’t the … seasonal patterns from the Pathfinder system taken … taken from a website? I cant recall the website name now.

    You can put Times in the Optimiser you know?

    GraHal

    PS Here’s a bit on Time of the Day re EurUSD

    https://www.dukascopy.com/fxcomm/fx-article-contest/?Seasonal-Cycles-In-Fx-Trading=&action=read&id=2018

    #59274 quote
    mr blue
    Participant
    Senior

    Investors don’t like Monday’s – always keep in mind. So you’re on the right path my friend.

    #59333 quote
    Vonasi
    Moderator
    Master

    Some days of the week are busier than others, some days of the month are busier than others and some hours are busier than others. If you put yourself in the mind of a professional trader then you will see repetitive behaviour.

    Monday – ‘Think I’ll just sit back a bit and see what the markets are doing before getting in’.

    Friday – Think I’ll just close down my positions for the weekend just in case’

    Last Day of Month – ‘Think I’ll cash in so my account looks good and I’ll get a big bonus’

    Market Opening – ‘Think I’ll just do a few stop raids and see what I can pick up before lunch’

    Market Closing – I don’t want to hold some of this riskier stuff overnight while I’m sleeping so I’ll sell up and get back in tomorrow’.

    Lunchtime – ‘Forget the trading I’m hungry so I’m off to the bistro’

    Asian Hours – ‘All the big players are asleep’

    and so on……

    Whether it helps to make profits I’m not sure. I think probability and risk management have more chance on their own – but then there is no point trading a market that isn’t moving because everyone is at lunch I guess.

    mr blue, GraHal and Inertia thanked this post
    #59335 quote
    mr blue
    Participant
    Senior

    LOL Vonasi – perfect summarized !

    #61431 quote
    JohnScher
    Participant
    Veteran

    Hello again.

    I wasn’t really interested in the behaviour of the BigBoys and their boredom.

    I was more concerned with the fact that investor behaviour on a Monday morning is different than on a Tuesday noon.

    Did you notice something like that too?

     

    What I mean is something like this….

    Code 1 is intended to effect Monday 090000 Long to Monday 130000.

     

    IF OpenDayofweek = 1 and Time = 090000 then
    buy 1 contract at market
    Endif
    
    If Time = 130000 Then
    sell at market
    Endif

    Result see attachment

     

    Code 2 is intended to effect Tuesday 130000 Long to Tuesday 170000

    IF OpenDayofweek = 2 and Time = 130000 then
    buy 1 contract at market
    Endif
    
    If Time = 170000 Then
    sell at market
    Endif

    Result see attachment

     

    Amazing or?

    Screenshot_12.png Screenshot_12.png Screenshot_13.png Screenshot_13.png Screenshot_14.png Screenshot_14.png Screenshot_15.png Screenshot_15.png
    #61443 quote
    Vonasi
    Moderator
    Master

    Unfortunately the future does not always pay any attention to the past.

    You could easily convert your little test code above to analyse each market just by making the day and time optimized variables and then run a backtest. This would then tell you which have been the most profitable hours and in which days in your sample period. The sample may be too small to be conclusive. The only way to prove if this information has any value at all is to then forward test by running a strategy that just buys or sells in those hours and days and then you can see if the future is willing to copy the past. If it does then this could be used to maybe add an edge to a strategy by only letting it trade the most likely hours on the most likely days to be profitable.

    Forward testing is boring as we would all like to get rich today based on what happened yesterday but it is a necessary evil that we must learn to embrace!

    #61449 quote
    JohnScher
    Participant
    Veteran

    Na hi.

    “This would then tell you which have been the most profitable hours and in which days in your sample period.”

    That is the intention.

     

     

    “The only way to prove if this information has any value at all is to then forward test by running a strategy that just buys or sells in those hours and days and then you can see if the future is willing to copy the past…”

    Yes, all our plans here are based on the same principle.
    We test what would have been in the past if our program had run
    and then we take the program and run it in demo or live as forward testing

    but

    in the moment we complete the forward test, we were just testing the past.

     

    Regardless of this, I would like to know who can program such an indicator, which shows (x-units) on the basis of past data, has the price risen or dropped between 090000 and 130000 on Monday, if so, what percentage? How did the course from Monday 130000 to Monday 170000, etc. behave?
    Of course, one can then generalize such an indicator and base it on each value and each time unit.

    That´s it what i m looking for.

     

    Kind

     

     

     

    #61452 quote
    Vonasi
    Moderator
    Master

    Not an indicator but the strategy I suggested is attached as an ITF file. Run it and the Optimize Report will show which have been the best days/hours for long positions. It should be easily adapted for short positions if you wish.

    IF OpenDayofweek = D and Time = T then
    buy 1 contract at market
    Endif
    
    If OnMarket Then
    sell at market
    Endif
    
    Inertia thanked this post
    Day-and-Time-Analysis.itf
    #61471 quote
    Vonasi
    Moderator
    Master

    Short version. ITF attached.

    It would probably make sense to analyse one day at a time (by setting D to the required day) and then chart each days results in Excel to see if there is any sort of rhythm to the results. I think that the % of wins is of more interest than the actual amount won as it only takes one big bar in any particular hour of any particular day to skew the results. Any % of wins over 50% is of interest as 50% can be achieved by a monkey with a pin!

    IF OpenDayofweek = D and Time = T then
    SellShort 1 contract at market
    Endif
    
    If OnMarket Then
    ExitShort at market
    Endif
    
    Day-and-Time-Analysis-SHORT.itf
    #61477 quote
    GraHal
    Participant
    Master

    Thanks Vonasi

    Sorry JohnScher I couldn’t resist! 🙂

    Seems most wins are close to 50% so no pattern maybe??  Or do we need to analyse more?

    What you reckon Vonasi??

    Cheers
    GraHal

    JohnScher-1.jpg JohnScher-1.jpg JohnScher-2.jpg JohnScher-2.jpg
    #61485 quote
    GraHal
    Participant
    Master

    If anything, 21:00 is a good time to short the eurusd but that is probably because a lot of traders exit at 21:00 (GMT / UTC +0) so they don’t hold overnight?

    JohnScher-3.jpg JohnScher-3.jpg
    #61497 quote
    Vonasi
    Moderator
    Master

    I think that Forex is a probably more of a problem when searching for this sort of investor behaviour as it is more of a 50/50 casino IMHO. Indices I feel would be more likely to have some sort of investor behaviour time based bias. Having said that my attempts at using Excel on the DAX to try to find some sort of pattern have just resulted in an over-whelming feeling of randomness. I fear the data sample of 100k bars is too small to be of any use and even if I tested on more I fear the result would be similar.

    I used OpenTime rather than Time to make sorting the order more logical and highlighted the top 25% best results. Chart and Excel book attached.

    GraHal thanked this post
    Screenshot_1.png Screenshot_1.png Book1.xlsx
    #61506 quote
    verdi55
    Participant
    Veteran

    Trade DAX on short term time scales from Monday through Thursday between 9 and 10 am. And on Friday afternoon, after market opening in US. This is pretty regular.

Viewing 15 posts - 1 through 15 (of 27 total)
  • You must be logged in to reply to this topic.

investor behavior


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
JohnScher @johnscher Participant
Summary

This topic contains 26 replies,
has 5 voices, and was last updated by Vonasi
7 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/12/2018
Status: Active
Attachments: 27 files
Logo Logo
Loading...