diff --git a/ticker.py b/ticker.py index 0104713..08d9060 100644 --- a/ticker.py +++ b/ticker.py @@ -13,4 +13,6 @@ def get_history(symbol): df = get_history(args.symbol) print("Symbol: {}".format(args.symbol)) - print("Start: {}".format(df.head(1).index[0])) \ No newline at end of file + print("Start: {}".format(df.head(1).index[0])) + pct_change = df.Close.resample('A').last().pct_change().dropna() * 100 + print(pct_change.to_string(float_format=lambda x: "{:.1f} %".format(x)))