DEVTOME.COM HOSTING COSTS HAVE BEGUN TO EXCEED 115$ MONTHLY. THE ADMINISTRATION IS NO LONGER ABLE TO HANDLE THE COST WITHOUT ASSISTANCE DUE TO THE RISING COST. THIS HAS BEEN OCCURRING FOR ALMOST A YEAR, BUT WE HAVE BEEN HANDLING IT FROM OUR OWN POCKETS. HOWEVER, WITH LITERALLY NO DONATIONS FOR THE PAST 2+ YEARS IT HAS DEPLETED THE BUDGET IN SHORT ORDER WITH THE INCREASE IN ACTIVITY ON THE SITE IN THE PAST 6 MONTHS. OUR CPU USAGE HAS BECOME TOO HIGH TO REMAIN ON A REASONABLE COSTING PLAN THAT WE COULD MAINTAIN. IF YOU WOULD LIKE TO SUPPORT THE DEVTOME PROJECT AND KEEP THE SITE UP/ALIVE PLEASE DONATE (EVEN IF ITS A SATOSHI) TO OUR DEVCOIN 1M4PCuMXvpWX6LHPkBEf3LJ2z1boZv4EQa OR OUR BTC WALLET 16eqEcqfw4zHUh2znvMcmRzGVwCn7CJLxR TO ALLOW US TO AFFORD THE HOSTING.

THE DEVCOIN AND DEVTOME PROJECTS ARE BOTH VERY IMPORTANT TO THE COMMUNITY. PLEASE CONTRIBUTE TO ITS FURTHER SUCCESS FOR ANOTHER 5 OR MORE YEARS!

How to Make Money – Perhaps

There is a whole industry dedicated to stock market and currency market trading. I am talking here about the short term trading activities that go on to try to take advantage of brief fluctuations in prices, rather than the more traditional investing strategies for the long time that rely on identification of businesses that are likely to improve their profits and dividends in the long term.

These short term trading activities are not based on any analysis of the true value of particular stocks, but instead take advantage of short term fluctuations in price. The big players have sophisticated computer programs at their disposal to detect and react to these changes, placing many trades in a short time scale to turn these short term price changes to their advantage. For these big players it is possible not only because of the tools they are using, but also because the large sums of money they are dealing with reduce the impact of commission on the trades considerably.

I have been wondering if there is a simple system that a private investor can use to take advantage of price fluctuations, without needing complex tools, and the need to place many trades a day.

Let me state at the outset, that everything that follows is my own personal analysis and interpretation of the publically available historical data of the performance of the FTSE 100 index. I cannot be held responsible for any profits or losses you might make if you follow my conclusions to generate your own trading patterns.

Hypothesis

These days it is possible to using a spread betting platform to place a bet against the future direction of an index, such as the FTSE 100 index. I have also noticed that the spread (which is in effect the commission payable) can be very tight. City Index are currently offering a spread of only 1 point on spread bets on the FTSE 100 index (which currently trades at over 6000 points).

I therefore decided to write a program to test an idea on how to make money spread betting on the FTSE 100 index, using historical data of FTSE 100 closing prices over the last 30 years (which is the time that the FTSE100 has been in existence).

The idea is simple. I have hypothesized that it may be possible to make a profit simply by betting on the fact that the index will move in opposite directions day by day. According to my theory, if the index rises one day, it is likely to go down the next and vice versa. If the hypothesis turns out to be incorrect, then the opposite strategy can be investigated in which you bet that the index will move in the same direction as the previous day. So to use the system all you have to do is to place a daily spread bet (which you close after 24 hours). You place your bet as either a buy or a sell bet depending on the direction the index has moved the previous day. Each day you will be closing one bet and opening another immediately.

Collecting the raw data for the analysis was simple enough – Yahoo finance will provide this free of charge as a CSV file with all the data dating back to the introduction of the FTSE 100. http://finance.yahoo.com/q/hp?s=%5EFTSE+Historical+Prices

Program

Here is the source code for the program I wrote to analyse the FTSE100 data. You can get results for any period you like within the 30 years of data. The program takes the size of the spread as input parameter and adjusts it according to the FTSE100 value of the time. As I mentioned these days you can get a spread of 1 point on the FTSE100 which trades at over 6000. In the 1980’s when the FTSE100 was trading in the 1000 to 2000 range the equivalent spread would have been proportionally smaller. This is not to say that spread betting with these small spreads was in fact available at the time, but that is of no consequence for our analysis. We can reasonably expect the spreads available in the future to be as least as good as they are today, and so it makes sense to apply this level of spread to the old data we are analysing.

I should mention that program assumes a starting point of £10000 and you are betting at £1 per point on movements in the index.

Please note that due to some syntax restrictions of the wiki, I am unable to include the full line where the data file is opened. In the code you will an incomplete reference to fopen. If you take this code to run or adapt you will need to insert a valid fopen declaration to open your data file.

#include <stdio.h>
#include <strings.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>

#define MAXSTRING 256

static double   prices[10001] ;
static int              dates[10001] ;
static char     buffer[MAXSTRING + 1] = "" ;
static char     *dateStr[10001] ;


loadData()
{
        FILE    *fp = NULL;
        int             pos = 10000 ;
        int             i=0;

        fp = fopen 
        while (fgets (buffer, MAXSTRING, fp))
        {
                char *rest = NULL ;

                char *date = (char *) strtok_r (buffer, ",", &rest) ;
                char *junk1 = (char *) strtok_r (NULL, ",", &rest) ;
                char *junk2 = (char *) strtok_r (NULL, ",", &rest) ;
                char *junk3 = (char *) strtok_r (NULL, ",", &rest) ;
                char *price = (char *) strtok_r (NULL, ",", &rest) ;

                prices[pos] = atof (price) ;

                struct tm   quantum;
                time_t      the_time;

                memset (&quantum, (char) NULL, sizeof (quantum)) ;

                strptime(date, "%d/%m/%Y", &quantum);
                the_time = mktime(&quantum) ;
                dates[pos] = (int) the_time ;

        dateStr[pos] = (char *) calloc (1, strlen(date) + 1) ;
        strcpy (dateStr[pos], date) ;

                pos--;
        }
        fclose (fp) ;
}

main (int argc, char ** argv)
{
        int             measuring = 0 ;
        int             startTime = 0 ;
        int             endTime = 0 ;
        double  total = 10000.0 ;
        char    *betdir = "opp" ;
        int             pos = 0 ;

        if (argc < 5)
        {
                printf ("Usage: ftse <startDate> <endDate> <spread> <betdir>\n") ;
                exit (0) ;
        }

        double spread = atof (argv[3]) * 0.5 ;
        betdir = strdup (argv[4]) ;

        struct tm   quantum;
        time_t      the_time;

        memset (&quantum, (char) NULL, sizeof (quantum)) ;
        strptime(argv[1], "%d/%m/%Y", &quantum);
        startTime = mktime(&quantum) ;

        memset (&quantum, (char) NULL, sizeof (quantum)) ;
        strptime(argv[2], "%d/%m/%Y", &quantum);
        endTime = mktime(&quantum) ;

        loadData();

        for (pos=1;pos<10000;pos++)
        {
                if (!measuring && dates[pos] >= startTime)
                {
                        // this is our start date
                        measuring = 1 ;
                        continue ;
                }

                if (measuring)
                {
                        double lastDirection = prices[pos-1] - prices[pos-2] ;

                        if (lastDirection > 0)
                        {
                                if (!strcmp (betdir, "opp"))
                                        total += prices[pos-1] - prices[pos] - (spread * prices[pos] / 6000.0) ;
                                else
                                        total += prices[pos] - prices[pos-1]  - (spread * prices[pos] / 6000.0);
                        }
                        else
                        {
                                if (!strcmp (betdir, "opp"))
                                        total += prices[pos] - prices[pos-1] - (spread * prices[pos] / 6000.0);
                                else
                                        total += prices[pos-1] - prices[pos] - (spread * prices[pos] / 6000.0);
                        }
        /*
                        printf ("Date:%s 2 days %f; 1 day %f; today %f; total %f\n",
                                        dateStr[pos], prices[pos-2],prices[pos-1],prices[pos],total) ;
        */
                        printf ("%s,%f\n", dateStr[pos], total) ;

                        if (endTime <= dates[pos])
                        {
                                // we have finished
                                break ;
                        }
                }
        }
}

Results

I took the output from the program and plugged it into a spreadsheet to produce a graph of how your money would have grown (or diminished) over the years

Please note that the analysis is based on the CLOSING prices only. Opening prices are likely to be different from the closing prices. So for example we are betting on the movement of the index from 4:30 on Wednesday evening (closing bell) to 4:30 on Thursday evening, based on the movement that occurred between 4:30 on Tuesday evening and 4:30 on Wednesday evening.

Thus this analysis is based on the spread bet for the next day being placed immediately after close of the market i.e at about 4:30 pm

Scenario 1 – Opposite Direction Bet

Clarification: This means betting that the index will move in the opposite direction from its movement in the previous session. So for example we are betting that the index will rise on Friday (period 4:30pm Thurs to 4:30PM Fri) if it fell on Thursday (period 4:30PM Wed to 4:30PM Thurs). Or we are betting that the index will fall on Monday (period 4:30PM Fri to 4:30PM Mon) if it rose on Friday (period 4:30PM Thursday to 4:30PM Friday).

ftseopp.jpg

Scenario 2 – Same Direction Bet

Clarification: This means betting that the index will move in the same direction as it did in the previous session. So for example we are betting that the index will fall on Friday (period 4:30pm Thurs to 4:30PM Fri) if it also fell on Thursday (period 4:30PM Wed to 4:30PM Thurs). Or we are betting that the index will rise on Monday (period 4:30PM Fri to 4:30PM Mon) if it rose on Friday (period 4:30PM Thursday to 4:30PM Friday).

ftsesame.jog.jpg

Discussion

The results are interesting. They show that from the inception of the FTSE 100 until about the turn of the century, you would have done best by betting the index will move in the same direction as the previous day. However, something seems to have happened around the year 2000, and since that time it has been best to bet that the daily direction will be opposite to the previous day.

More frustratingly, the results for the last 3 years are inconclusive with either approach,

Now lets look at a graph of how the FTSE 100 itself has performed over the period.

ftse.jpg

We see that the index steadily increased of the period from the inception of the index until the turn of the century. Since then the index has been volatile – with periods of growth and periods of decline. The index has still, to date, not exceeded the level it reached at the end of the 20th century,

So one interpretation (and this is just speculation) is that during periods of growth it is best to bet on the direction of the index being the same as the previous days direction. However, during periods of volatility it is best to bet that the daily direction will be opposite to the previous direction.

But there is an alternative interpretation (which I favour). There does seem to have been a fundamental shift around the year 2000. If you look at the period from 2003 to 2007, this was a period of steady growth in the FTSE 100 index, and yet using the mechanism of betting for opposite direction we see a steady profit being made. Then the period from 2007 to 2009 was a period of rapid decline in the index, but we still see the mechanism of betting for opposite direction showing a healthy profit. Admittedly the results since 2009 have been inconclusive either way.

My interpretation is that the turn of the century coincided with a rapid increase in the use of computer driven trading actions, as well as far greater activity from individual private investors who were able for the first time to carry out trades on the internet. This combination of factors has led to increased volatility of the index on a daily basis, regardless of whether the overall trend is up or down. Hence my view is that the mechanism of betting for opposite direction in the index on a daily basis is likely to bear fruit into the future.

I have only performed the above analysis on the FTSE 100 index, but there are many indices on which you could apply the same principles. You may well find an index where there is a clear cut case for betting either for same direction or opposite direction movement from day to day. The idea and the tool for checking it are at your disposal courtesy of this article. I wish you the best of luck. If you make yourself a nice profit you are welcome to send some devcoins to my tip address.

Postscript - Other Scenarios

After writing the above I found myself wondering what would happen if I tried some other random ways of placing a bet on the movement of the FTSE 100 index. Instead of betting on today's movement based on yesterday's, how about using the movement in the index from 2 days ago? Or from 3, 4 or 5 days ago? Since I had all the data available, it was only a very small tweak to the program to investigate this, and the results are EXTREMELY interesting - see below.

Scenario 3 – 2 days before Opposite Direction Bet

Clarification: This means betting that the index will move in the opposite direction from its movement 2 sessions ago. So for example we are betting that the index will rise on Friday (period 4:30pm Thurs to 4:30PM Fri) if it fell on Wednesday (period 4:30PM Tue to 4:30PM Wed). Or we are betting that the index will fall on Monday (period 4:30PM Fri to 4:30PM Mon) if it rose on Thursday (period 4:30PM Wednesday to 4:30PM Thursday).

ftseopp2.jpg

Scenario 4 – 2 days before Same Direction Bet

Clarification: This means betting that the index will move in the same direction as its movement 2 sessions ago. So for example we are betting that the index will fall on Friday (period 4:30pm Thurs to 4:30PM Fri) if it also fell on Wednesday (period 4:30PM Tue to 4:30PM Wed). Or we are betting that the index will rise on Monday (period 4:30PM Fri to 4:30PM Mon) if it also rose on Thursday (period 4:30PM Wednesday to 4:30PM Thursday).

ftsesame2.jpg

Scenario 5 – 3 days before Opposite Direction Bet

Clarification: This means betting that the index will move in the opposite direction from its movement 3 sessions ago. So for example we are betting that the index will rise on Friday (period 4:30pm Thurs to 4:30PM Fri) if it fell on Tuesday (period 4:30PM Mon to 4:30PM Tue). Or we are betting that the index will fall on Monday (period 4:30PM Fri to 4:30PM Mon) if it rose on Wednesday (period 4:30PM Tuesday to 4:30PM Wednesday).

ftseopp3.jpg

Scenario 6 – 3 days before Same Direction Bet

Clarification: This means betting that the index will move in the same direction as its movement 3 sessions ago. So for example we are betting that the index will fall on Friday (period 4:30pm Thurs to 4:30PM Fri) if it also fell on Tuesday (period 4:30PM Mon to 4:30PM Tue). Or we are betting that the index will rise on Monday (period 4:30PM Fri to 4:30PM Mon) if it also rose on Wednesday (period 4:30PM Tuesday to 4:30PM Wednesday).

ftsesame3.jpg

Scenario 7 – 4 days before Opposite Direction Bet

Clarification: This means betting that the index will move in the opposite direction from its movement 4 sessions ago. So for example we are betting that the index will rise on Friday (period 4:30pm Thurs to 4:30PM Fri) if it fell on Monday (period 4:30PM Fri to 4:30PM Mon). Or we are betting that the index will fall on Monday (period 4:30PM Fri to 4:30PM Mon) if it rose on Tuesday (period 4:30PM Monday to 4:30PM Tuesday).

ftseopp4.jpg

Scenario 8 – 4 days before Same Direction Bet

Clarification: This means betting that the index will move in the same direction as its movement 4 sessions ago. So for example we are betting that the index will fall on Friday (period 4:30pm Thurs to 4:30PM Fri) if it also fell on Monday (period 4:30PM Fri to 4:30PM Mon). Or we are betting that the index will rise on Monday (period 4:30PM Fri to 4:30PM Mon) if it also rose on Tuesday (period 4:30PM Monday to 4:30PM Tuesday).

ftsesame4.jpg

Scenario 9 – 5 days before Opposite Direction Bet

Clarification: This means betting that the index will move in the opposite direction from its movement 5 sessions ago. So for example we are betting that the index will rise on Friday (period 4:30pm Thurs to 4:30PM Fri) if it fell the previous Friday (period 4:30PM Thurs to 4:30PM Fri). Or we are betting that the index will fall on Monday (period 4:30PM Fri to 4:30PM Mon) if it rose on the previous Monday (period 4:30PM Friday to 4:30PM Monday).

ftseopp5.jpg

Scenario 10 – 5 days before Same Direction Bet

Clarification: This means betting that the index will move in the same direction as its movement 5 sessions ago. So for example we are betting that the index will fall on Friday (period 4:30pm Thurs to 4:30PM Fri) if it also fell on the previous Friday (period 4:30PM Thurs to 4:30PM Friday). Or we are betting that the index will rise on Monday (period 4:30PM Fri to 4:30PM Mon) if it also rose on the previous Monday(period 4:30PM Friday to 4:30PM Monday).

ftsesame5.jpg

Conclusions

Scenario 3 and Scenario 5 (particularly Scenario 5) both seem to be beneficial. I can think of no logical reason why this should be the case, but it certainly seems that betting that the index will move in the opposite direction to its movement of 3 sessions previously will reap rewards! During the early part of the period (1985 to about 1998) there is a fractional loss of money, but thereafter our cash increases rapidly. We started with £10000 on the 1st Jan 1985 and reached a low of £8189 on 4th Jun 1997, but then our profits returned and as of 3rd Feb 2014 we have £21587.

So in good times we seem to be making money at a good rate, and there seems to be minimal downside in bad times. Also there does not seem to be any correlation between a falling or rising market and the success of this method. Since about 1998 this system has worked well, so again my assumption is that it could be related to modern trading patterns. I am sufficiently convinced that I have just opened a City Index Trading account…

Stop Press

I have now performed a similar analysis on the Dow Jones index. This has lead me to think Scenario 1 could be better than Scenario 5 after all. See How to Make More Money – Possibly for details.


Commerce | Investing | Trading


QR Code
QR Code how_to_make_money (generated for current page)
 

Advertise with Anonymous Ads