- increased k of UnivariateSpline to fixed Macd_fdd
git-svn-id: http://moon:8086/svn/projects/Stock@330 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -48,7 +48,7 @@ class Stock(object):
|
||||
try:
|
||||
lastmodified = dt.datetime.fromtimestamp(os.stat(filename).st_mtime).date()
|
||||
if lastmodified != today:
|
||||
fetch = fetch_on_outdated
|
||||
fetch = self.params2['fetch_on_outdated']
|
||||
except:
|
||||
fetch = True
|
||||
|
||||
@@ -97,7 +97,7 @@ class Stock(object):
|
||||
|
||||
x_r = np.linspace(0, N, N)
|
||||
y_r = self.data['macd']
|
||||
spl = UnivariateSpline(x_r, y_r)
|
||||
spl = UnivariateSpline(x=x_r, y=y_r, k=5)
|
||||
spl.set_smoothing_factor(0.25)
|
||||
spl_d = spl.derivative()
|
||||
spl_dd = spl_d.derivative()
|
||||
|
||||
Reference in New Issue
Block a user