1
$\begingroup$

I am a beginner on statistic but come across an urgent situation that I have to work with statistics of stock prices data.

I have learned that ones can do a hypothesis test that rejects the Random Walk hypothesis in order to show that the data have trends. I have tried to understand it but that seems impossible for me as a completely beginner. (beside simple concepts like probability and linear regression, I have just learned about the hypothesis test along the way!)

I have tried finding if there are easier alternative ways that I can understand but am feeling lost as there are too many terms that I don't know such as parametric-nonparametric thing, t-statistics, residuals etc.. Not to mention that I can't randomly pick a test strategy to do the work, could I?

In fact, I am not doing any deep analysis at all. All I want to do is to prove that a subset of my data is statistically increasing or not (in fact it is, visually), as follows.

I have a time series of historical prices, $\{p_0, p_1, p_2,...,p_n\}$. And I have an algorithm to pick 2 points $p_{t1}$ and $p_{t2}$ (with $ {t2} > {t1}$) such that $p_{t1} < p_{t2}$. Then I want to show that the prices between $p_{t1}$ and $p_{t2}$ is statistically increasing. Please guide me to do that or advise a learning path that leads straight to the topic. Thank you.

Additional Information

The picture below shows examples of the case where the prices between the two points are increasing and the case where not. Example of the case where the prices between the two points are increasing and the case where not.

My algorithm involves the use of MACD and fuzzy logic but it's just a trial-and-error thing and may looks basically like nothing more than asking a person to pick two points as mentioned. My intention is that the algorithm chooses $p_{t2}>p_{t1}$ due to that the data have the increasing trend from $t1$ to $t2$, not by chance

$\endgroup$
  • 1
    $\begingroup$ Please explain what you mean by "statistically increasing." After all, because $p_{t1}\lt p_{t2},$ by definition the prices have increased from $t1$ to $t2$. You probably will need to describe your algorithm in order to get useful responses. $\endgroup$ – whuber Jan 21 '14 at 16:25
  • $\begingroup$ My algorithm involves the use of MACD and fuzzy logic but it's just a trial-and-error thing and may looks basically like nothing more than asking a person to pick two points as mentioned. My intention is that the algorithm chooses $p_{t2}>p_{t1}$ due to that the data have the increasing trend from $t1$ to $t2$, not by chance. By increasing trend, I don't know how to define it but there might be a case that the data go up and down randomly but the algorithm still is able to choose the points. $\endgroup$ – asinkxcoswt Jan 21 '14 at 16:41
  • 1
    $\begingroup$ Well, let's try this: how would you characterize the times $t1$ and $t2$ that your algorithm finds? Examples of characterizations would be "times at which the maximum and minimum prices are observed" or "times between which the slope in price is maximized" or "times bracketing the longest period in which the price never dropped." $\endgroup$ – whuber Jan 21 '14 at 17:10
  • $\begingroup$ Sorry, but I am completely lost in what you asked. T_T. $\endgroup$ – asinkxcoswt Jan 21 '14 at 17:20
  • 2
    $\begingroup$ You don't have an understandable or answerable question until you can describe, in sufficient detail, what you are doing and what you wish to accomplish. It's not even clear from the image you have posted what you mean by "trend": after all, in both cases there are increases in prices between the two times. $\endgroup$ – whuber Jan 21 '14 at 17:36
-1
$\begingroup$

You could regress your data against a sequence (from 1 to n) and look at the t-statistic and coefficient to analyse if there is a trend.

The equation would be $Y=\beta t + \epsilon$ where $t$ is the trend and $\epsilon$ is the residual. Use the t-value to see if the trend is significant, and look at the coefficient to determine the direction and slope.

Is this what you are looking for?

$\endgroup$
  • $\begingroup$ I voted this down because I don't think the question's clear enough to answer & because I think it's dangerous to give the impression to beginners in statistics that models containing deterministic trend & no auto-correlation are in general appropriate ones for time series. Random-walk models are good ones for stock prices, or there wouldn't be so much effort put into trying to show that they can be improved on. $\endgroup$ – Scortchi - Reinstate Monica Jan 22 '14 at 10:05
  • $\begingroup$ Thank you for providing a reason for voting down. Obviously the person asking disagrees. I don't suggest that the model are appropriate for predictive analysis, I was just trying to show a way trends are account for in time series analysis. Did you also vote down the question? That would be more appropriate in my opinion. $\endgroup$ – fredrikhs Jan 22 '14 at 19:19
  • $\begingroup$ I didn't vote the question down because the OP is new to the site & I didn't want to discourage him. $\endgroup$ – Scortchi - Reinstate Monica Jan 22 '14 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.