some trial codes for stock using R