Store calculated value on Asset


What is the best way to do the following:
1 - Compute a value related to an Asset (in this case the mean value of some measurements and some correlation between two measurements).
2 - Store that value for each Asset.
3 - Create a metric that uses this results.