Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

LindeX average rate calculation change

Lawrence Linden
Linden Lab Developer
Join date: 25 Jun 2005
Posts: 235
05-09-2006 14:28
I'm changing the way that we calculate the daily average exchange rate from being a weighted mean to being just (total L$ traded)/(total US$ traded).

Here's the database code change for the SQL fanatics:
CODE

old: SUM(quantity*rate)/SUM(quantity) AS average_rate,
---
new: SUM(quantity)/SUM(quantity/rate) AS average_rate,


The historical data should be updated this afternoon, but the "Today's average" in the "Daily Summary" on the currency pages won't update until tomorrow morning around 10:30am. I'll post a new dump of the market data after the historical data has been updated.

I'm attaching a spreadsheet to this post that I used when experimenting with the average calculations.

I'm definitely open to suggestions if you have a more meaningful "average" that you'd like to see. For example, the interquartile mean looks interesting.

With limit buys on the near horizon the average becomes a bit less relevant... it would only serve as a market rate somewhere between the average limit buy and the average limit sell rates.

Feedback on how we can improve the "Daily Summary" so that its more useful in a post-limit-buy world would be greatly appreciated. I'm assuming that stats like both the best buying rate, and the best selling rate would be useful.

Cheers,
Lawrence
Lawrence Linden
Linden Lab Developer
Join date: 25 Jun 2005
Posts: 235
05-09-2006 15:08
OK, the historical data has been updated.

Here's a fresh dump of the basic market data.

Cheers,
Lawrence
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
05-09-2006 15:45
Yay! tysm!
_____________________
imakehuddles.com/wordpress/
Svar Beckersted
Registered User
Join date: 14 Apr 2006
Posts: 783
05-09-2006 15:51
I agree that was badly needed, great decision.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
05-09-2006 16:21
As requested elsewhere, I'd like to see a report with a mean, mode, median, ideally skew and interquartile range and/or simple average of the quartiles too. Depending on your skew numbers you could give us a standard deviation if it ever rises to the point of being greater than L$0.1 - it will I guess with some of the "crazy" outliers.

Given the nature of the dataset I'm pretty sure an SD won't be very reliable, it will fail horribly on the assumption of near normal distribution, hence the request for a skew number too. Mode and median will let us look at numbers without the outliers making such a dramatic effect...
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
05-20-2006 06:25
Lawrence? Did the formulas revert or something? It looks like you are using the old formula again for yesterday.
_____________________
imakehuddles.com/wordpress/
Lawrence Linden
Linden Lab Developer
Join date: 25 Jun 2005
Posts: 235
05-20-2006 14:59
From: Keiki Lemieux
Lawrence? Did the formulas revert or something? It looks like you are using the old formula again for yesterday.


Yeah, the code changes missed a branch merge and got reverted (at least for the historical data and graphs), I just fixed it by hand (deleted the data and forced it all to be recreated) and kicked off an email to the appropriate person to ask them to make sure that the change winds up in the next release branch.

Cheers,
Lawrence
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
05-20-2006 16:55
From: Lawrence Linden
Yeah, the code changes missed a branch merge and got reverted (at least for the historical data and graphs), I just fixed it by hand (deleted the data and forced it all to be recreated) and kicked off an email to the appropriate person to ask them to make sure that the change winds up in the next release branch.

Cheers,
Lawrence

Thanks!
_____________________
imakehuddles.com/wordpress/