2
$\begingroup$

I have a large sample of market data - that is the prices and amount of goods being sold by vendors at specific, but inconsistent, points in time. Assuming I am a buyer and the quality of the goods are constant across the entire market (consumable goods by one manufacturer, let's say), how would you graph this data? Keep in mind that outliers may exist (fire sales or inflated asking prices).

Seeing as I'm only concerned with the lowest-priced goods at a specific moment in time, a market average wouldn't do much for me unless I was buying most of the market's supply. I considered a box plot, but that also tends to be mean/median-biased. A simple line/area/bar graph of the lowest prices over time doesn't seem to give enough information, especially if there isn't much volume available at the lowest price.

*I'm not a stats guy, so go easy on me!

$\endgroup$
  • 1
    $\begingroup$ Should this be community wiki? I know that more than one reasonable answer could be given, but it seems like a question where reputation should be awarded. $\endgroup$ – Jeromy Anglim Sep 12 '10 at 8:43
  • $\begingroup$ I am more or less looking for opinions, so there's no real "solution" to my question. Though I would be happy to award reputation to good responses...if it's possible. $\endgroup$ – Kevin Sep 12 '10 at 23:19
  • $\begingroup$ Doesn't look like I can change it back into a regular question - could a moderator help with this? $\endgroup$ – Kevin Sep 12 '10 at 23:28
3
$\begingroup$

You could create a scatterplot with time on the x-axis and price on the y-axis. You could make the size of the points proportional to the amount sold (or some function of amount sold such as log of amount sold). You could add a line that passed through the minimum values or some estimate of the minimum, where the data was unavailable.

If you are trying to model the minimum price at any given point in time, it seems like you would need to make some assumptions about the duration of any particular price. If you knew the minimum price for each time period you could graph just that data. If there are time points with missing data, you could use some form of missing data imputation.

Local quantile regression might also be of interest.

You might also need to consider issues of invalid data: e.g., very low prices that only last a short period of time or have a minimal quantity of stock that for what ever reason should not be interpolated to future time points.

$\endgroup$
2
+25
$\begingroup$

A slight variation on Jeromy's theme: time on the horizontal axis, price on the vertical axis. Plot multiple lines: one connecting the minimum prices, one connecting the 10% quantiles of prices, one connecting the 25% quantiles of prices. Plot these lines in varying shades of gray: large amounts of product available at that price translate into a black line, small amounts into an almost white line.

I like scaling things like these to the interval 0-100, then using the colors named "gray0" to "gray100" in R: http://research.stowers-institute.org/efg/R/Color/Chart/ColorChart.pdf

However, this kind of relies on your data not being too irregularly spaced in time. If this is an issue, Jeromy's idea of local quantile regression is appealing. You may be able to tweak the quantreg package in R to help you here.

$\endgroup$
  • $\begingroup$ you don't need to tweak it. Quantreg will happily digest irregularly spiced time series. $\endgroup$ – user603 Sep 18 '10 at 21:57
  • $\begingroup$ No doubt about that. But does it do local quantile regression? - If not, one can play around with the weights and just calculate lots of models $\endgroup$ – Stephan Kolassa Sep 18 '10 at 22:06
  • $\begingroup$ > yes it does local quantile regression as well (see the vignette (cran.r-project.org/package=quantreg). $\endgroup$ – user603 Sep 22 '10 at 22:40

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.