given someone's past investing history, is there a way to calculate his risk aversion? given someone's past investing history, is there a way to calculate his risk aversion?
Say, we know this client's investment history for example his past return, is there a way to calculate his risk aversion and use this parameter to portfolio optimization?
Generally speaking no. You wouldn't be able to distinguish re-balancing for risk aversion reasons from re-balancing motivated by changes in expected returns or the co-variance of returns. 

Consider the simple case of a household periodically re-balancing their investments in across both a fixed index fund and an equity index fund. The econometrician sees the investor reduce their equity holdings and increase the fixed income investment. Any of the following could induce such a change:


An increase in risk aversion
Lower expected returns for the equity index
Higher expected returns for fixed income index
Greater positive co-variation of the two funds


And in reality, the situation is much worse because there are many investments, taxes, transaction costs, behavioral issues, and rational-inattention. 

I'm sure you could simplify and cook up a theoretical setting where you could do this (for one, just assume that all the other things cannot change), but in general this won't be possible.