Alphapy

Latest version: v2.5.0

Safety actively analyzes 619098 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

2.5.0

This release supports the following optional packages:

* [LightGBM](https://github.com/microsoft/LightGBM)
* [CatBoost](https://github.com/catboost/catboost)

2.4.3

This release contains bug fixes and refactoring based on major releases in the Python ecosystem.

2.4.0

This release contains the following features:

* Feature Names are now shown in the Feature Importance Plots.

* Categorical Encoders have been updated: https://contrib.scikit-learn.org/categorical-encoding/

* Confusion Matrices now have counts along with percentages.

* This release has been updated for pandas 1.0 and scikit-learn 0.22.

* Bug Fixes and Refactoring. Please report any problems to: https://github.com/ScottfreeLLC/AlphaPy/issues

2.3.9

This release contains the following features:

* The **market** section of the *market.yml* file has been augmented with the fields **subschema**, **api_key_name**, and **api_key**. Subschema refer to specific feeds within a service. For example, WIKI is a stock feed within Quandl, so **schema** is set to the value *quandl* and **subschema** is set to *wiki*. We have also added API keys, which are required to access IEX and Quandl. The **api_key_name** is an environment variable defined by the platform, and you must register for an API key, inserting the **api_key** value as shown in the example below.

~~~~
market:
create_model : True
data_fractal : 1w
data_history : 2000
forecast_period : 1
fractal : 1d
lag_period : 1
leaders : []
predict_history : 50
schema : iex
subschema :
api_key_name : IEX_TOKEN
api_key : xx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
subject : stock
target_group : tech
~~~~

* **IEX** data has been migrated to the cloud and requires an API key. We use the Python package **iexfinance** to get historical daily and intraday data. Because of the different pricing tiers, you may run out of quota if you are still on the free tier.

* **Yahoo** daily data is still available through *pandas-datareader* (no API key required), and intraday data is rate-limited via a custom Yahoo URL.

* There are other sources of stock prices via *pandas-datareader*. Depending upon the API, we may or may not support these specific feeds.

* The **Quandl** WIKI feed discontinued its daily prices, but you can still get historical data before March 27th, 2018.

* The **Google Finance** API is no longer available.

* Note that AlphaPy fetches all of its data with the aforementioned feeds on the fly, but if you get historical prices elsewhere, then you can drop the files in the *data* directory (use **schema** *data*), and AlphaPy will automatically load these data for you.

* We recommend using the **IEX** for your primary data feed, but you can use **Yahoo** if you just need daily data.

* AlphaPy used to expect separate files for both *train* and *test* data. Now, you can provide a single *train* file, and this file will be split into train and test. You can adjust the **split** ratio in the *model.yml* file.

* When AlphaPy runs in prediction mode, it uses **predict_history** from the *market.yml* file to build those features that require data from previous time periods, e.g., a 50-day moving average. Thus, the **predict_history** field should be set to the number of time periods for the feature that goes furthest back in time. (N.B. This does not apply to model training, which was a bug fixed in this release.)

* The package **joblib** is now imported directly, and many of the multiprocessing bugs seem to have been fixed.

* A bug for dropping columns has been fixed.

2.3.3

This release contains the following features:

* The [IEX](https://iextrading.com/developer/docs/) exchange is now the default end-of-day stock feed. You can download up to 5 years of historical daily data.

* Several market data bugs have been fixed.

* The multiprocessing fork code has been removed. If you're still having problems with Keras and multiprocessing, then set *number_jobs* to *1* in the **model.yml** file.

2.3.1

This release contains the following features:

* You can now use the **[Keras Sequential](https://keras.io/models/sequential/)** model for classification and regression. Please refer to the **KERASC** and **KERASR** entries in the *algos.yml* configuration file. Note that the *input_shape* argument is automatically added by AlphaPy based on the shape of the training set, with a limit of 10 layers per model.

~~~~

KERASC:
Keras Classification
model_type : classification
layers : ["Dense(12, activation='relu')",
"Dense(1, activation='sigmoid')"]
compiler : {"optimizer" : 'rmsprop',
"loss" : 'binary_crossentropy',
"metrics" : 'accuracy'}
params : {"epochs" : 50,
"batch_size" : 10,
"verbose" : 1}
grid : {}

KERASR:
Keras Regression
model_type : regression
layers : ["Dense(10, activation='relu')",
"Dense(1)"]
compiler : {"optimizer" : 'rmsprop',
"loss" : 'mse'}
params : {"epochs" : 50,
"batch_size" : 10,
"verbose" : 1}
grid : {}

~~~~

* Remove redundant RFE code and estimator classes. RFE is performed only when the **coef_** or **feature_importances_** attribute is present.

* Report (log) only those metrics that are relevant to either classification or regression.

* Added **[Brier Score](http://scikit-learn.org/stable/modules/generated/sklearn.metrics.brier_score_loss.html)** and **[Cohen's Kappa](http://scikit-learn.org/stable/modules/generated/sklearn.metrics.cohen_kappa_score.html)** for classification metrics.

* Remove the **scoring** field from the *algos.yml* configuration file. Just use **scoring_function** in the *model.yml* file.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.