I am curious how one can generate simulated time series data. I found a list of simulated series here and a similar tool for stock market. What is the best way to generate domain specific time series data with some desired patterns? How should one approach this problem? I know this question is not very complete yet so please feel free to suggest modifications.

For instance, if you want to simulate an AR1 process in MATLAB, you could proceed as follows:
This generates M points in time of the model: $$X_k = \alpha X_{k1} + \sigma u_k,$$ where $u_k$ is a standard normal variable. If you want a more sophisticated model for some natural (or synthetic) phenomenon then you would have to specify that model. To find a model for the movement of a stock price is a difficult problem. To calibrate (that is, to find the parameters of) such a model is also a difficult problem. 

