import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import fmin_tnc
import random
import pandas as pd
from pandas import Series, DataFrame
import datetime
import itertools
end_date = datetime.datetime.today().strftime("%Y-%m-%d")
SP = get_price('000001.XSHG', start_date='2010-06-01',
end_date=end_date , frequency='daily',
fields=['close','open'], skip_paused=False, fq='pre')