최초 프로젝트 업로드 (Script Auto Commit)
This commit is contained in:
13
smoke_test.py
Normal file
13
smoke_test.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
from strategy import compute_last_peak_series
|
||||
|
||||
# 간단한 High 시퀀스에서 피크가 있는 위치를 만들고 함수 동작 확인
|
||||
dates = pd.date_range('2023-01-01', periods=20)
|
||||
highs = np.array([10,11,12,11,13,12,14,13,12,15,14,13,16,15,14,17,16,15,18,17], dtype=float)
|
||||
|
||||
df = pd.DataFrame({'High': highs}, index=dates)
|
||||
|
||||
last_peaks = compute_last_peak_series(df, period=5)
|
||||
print('High:\n', df['High'].to_list())
|
||||
print('\nLAST_PEAK series:\n', last_peaks.tolist())
|
||||
Reference in New Issue
Block a user