Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Generating Stock Price Data

by whakka (Hermit)
on Sep 09, 2009 at 17:08 UTC ( #794403=note: print w/ replies, xml ) Need Help??


in reply to Generating Stock Price Data

Define "realistic." Your series is fairly autocorrelated - one may question whether it's random enough. Looking at the price picture you can see this - each day's price is largely the result of the previous day's momentum.

I agree with tmharish that you should look at real stock data for a realistic series. Google finance lets you look up historical data on a stock and exports to .csv (ex.). I'm sure there are other sources out there.


Comment on Re: Generating Stock Price Data
Re^2: Generating Stock Price Data
by TeraMarv (Beadle) on Sep 09, 2009 at 17:25 UTC

    I was hoping that I could at least partly simulate the 'Greed' and 'Fear' that drives the market. Mostly price movement in my opinion is driven by human psychology and is not truly random in that we are prone to irrational decisions. When you look at stock price movements the decline in prices is nearly always faster that the previous increase by at least a factor of two and usually greater. This is one example of where a purely random system is not representative of the real world.

    While using real stock data does provide 'realistic' data for testing it is limited to historical movements which may or may not be repeated in the future. To test the robustness of a trading system it needs to be tested on all scenarios not just those which have occurred.

      "When you look at stock price movements the decline in prices is nearly always faster that the previous increase by at least a factor of two and usually greater."

      Do you have the source for this? It sounds like an interesting read. I can see where that might be the case for bubbles, but I didn't know such a thing was so prevalent.

      As to your last point, I would argue that the sheer volume of existing historical data probably encompasses more possible trends than one can invent. Especially if you think prices are psychologically driven, then you'd expect the trends to repeat themselves over and over again, no?

        I can't remember the source of that information at present. I will post it if it comes to me later.

        It may be that human psychology stays the same and that this should mean that patterns in stock price movements may develop and repeat but by using generated data it avoids curve fitting the trading system to a specific data series. Again a psychological aspect.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://794403]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-09-20 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls