Input/Output
Detect optimal optima and minima.
- param X:
Data such as stock prices in a 1D vector.
- type X:
array-like : 1D array.
- raises Exception:
1D array should be of type 1D numpy array or list.
- returns:
Object.
X (array-like : 1D array.) – Input 1D vector.
simmat (np.array) – Simmilarity matrix
loc_start (list of int) – list of indexes containing start positions
loc_stop (list of int) – list of indexes containing stop positions
loc_start_best (list of int) – list of indexes containing the best starting positions
loc_stop_best (list of int) – list of indexes containing the best stopping positions
agg (1D array-like) – Aggregated 1D array
df (pd.DataFrame) – Results in the form of a dataframe.
Plot
Plot results.
- param threshold:
Required to optimize for the maximum depth of the local-minima. At the ith location, k windows (eg 50) are overlaid and the percentages are determined.
- type threshold:
float [0,..,1], default : 0.25
- param figsize:
Figure size. The default is (25,15).
- type figsize:
tuple, optional
- rtype:
None.
Gridsearch
Gridsearch to find best fit.
- param X:
Input 1D vector.
- type X:
array-like : 1D array.
- returns:
Object containing dict with key [‘gridsearch’] such as cs.gridsearch
balances (np-array) – results of balances across various levels of: window x minperc
trades (np-array) – results of trades across various levels of: window x minperc