Advanced Financial Feature Engineering Library for Quantitative Finance and Algorithmic Trading
Project description
FinFeatures
Advanced Financial Feature Engineering Library for Quantitative Finance and Algorithmic Trading
FinFeatures is a comprehensive Python library designed for financial technical analysis and feature engineering. It provides a wide range of technical indicators, statistical transformations, and utility functions optimized for quantitative finance applications.
🚀 Key Features
Technical Indicators
- Moving Averages: Simple (SMA) and Exponential (EMA) Moving Averages
- Momentum Indicators: RSI, MACD with Signal and Histogram
- Volatility Indicators: Bollinger Bands, Average True Range (ATR)
- Oscillators: Stochastic Oscillator, Williams %R
- Other Indicators: Commodity Channel Index (CCI)
Statistical Transformations
- Volatility Analysis: Rolling volatility with annualization options
- Returns Calculation: Simple and logarithmic returns
- Statistical Measures: Rolling correlation, beta, z-scores, skewness, kurtosis
- Normalization: MinMax, Z-score, and Robust scaling methods
Advanced Features
- Signal Generation: Automated buy/sell signal generation
- Multi-timeframe Analysis: Batch processing for multiple timeframes
- Memory Efficient: Optional in-place operations
- Type Safety: Full type hints and validation
- Robust Error Handling: Comprehensive input validation
📦 Installation
From PyPI (Recommended)
📊 Available Functions
Technical Indicators
| Function | Description | Key Parameters |
|---|---|---|
simple_moving_average() |
Simple Moving Average | window, min_periods |
exponential_moving_average() |
Exponential Moving Average | window |
relative_strength_index() |
RSI with Wilder's smoothing | window (default: 14) |
macd() |
MACD with signal and histogram | fast, slow, signal |
bollinger_bands() |
Bollinger Bands with position | window, num_std |
average_true_range() |
Average True Range | window (default: 14) |
stochastic_oscillator() |
Stochastic %K and %D | k_window, d_window |
williams_r() |
Williams %R | window (default: 14) |
commodity_channel_index() |
Commodity Channel Index | window (default: 20) |
Statistical Transformations
| Function | Description | Key Parameters |
|---|---|---|
rolling_volatility() |
Rolling volatility calculation | window, annualize |
percent_change() |
Simple/log returns | periods, method |
rolling_correlation() |
Rolling correlation | column1, column2, window |
rolling_beta() |
Rolling beta calculation | asset_col, market_col, window |
z_score() |
Rolling z-score | window |
rolling_skewness() |
Rolling skewness | window |
rolling_kurtosis() |
Rolling kurtosis | window |
price_normalization() |
Various normalization methods | method, window |
Convenience Functions
| Function | Description |
|---|---|
basic_feature_set() |
Apply basic technical indicators |
premium_feature_set() |
Apply comprehensive indicator set |
multi_timeframe_sma() |
SMA for multiple timeframes |
generate_sma_signals() |
Generate trading signals |
🔧 Configuration
Default Parameters
Custom Indicator Pipeline
Trend indicators
df = ff.multi_timeframe_sma(df, price_col, windows=) df = ff.exponential_moving_average(df, price_col, window=12) df = ff.exponential_moving_average(df, price_col, window=26)
Momentum indicators
df = ff.relative_strength_index(df, price_col, window=14) df = ff.macd(df, price_col)
Volatility indicators
df = ff.bollinger_bands(df, price_col, window=20) df = ff.rolling_volatility(df, price_col, window=20)
Generate signals
df = ff.generate_sma_signals(df, price_col, fast_window=10, slow_window=30)
return df
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Setup
🐛 Bug Reports
If you encounter any bugs, please file an issue on GitHub Issues with:
- A clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Your environment details
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built with pandas and numpy
- Inspired by various financial analysis libraries
- Thanks to the quantitative finance community
📚 Additional Resources
Happy Trading! 📈
Made with ❤️ by Advait Dharmadhikari
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file finfeatures-0.2.0.tar.gz.
File metadata
- Download URL: finfeatures-0.2.0.tar.gz
- Upload date:
- Size: 9.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbf22e57228b33aaf790f1722773de63435f754719d4a5f210a5d52274e42f77
|
|
| MD5 |
bd160ba6afd2de2ba79a4072cd00c41d
|
|
| BLAKE2b-256 |
699eebaf1dbbf6bec8195f72d844cc2ddd8e6848622428057dc7af9ee16ba32c
|
File details
Details for the file finfeatures-0.2.0-py3-none-any.whl.
File metadata
- Download URL: finfeatures-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38ef2c6da1183bf33738f2f2bea81e0c3386097e0122bee1f2e7dc644521c67e
|
|
| MD5 |
6fb4c8b96ff2449b9bed4943bce2100d
|
|
| BLAKE2b-256 |
e08fb6aab8e31e9176c94d56663e31bb45d3901031146a0aaf6d11f585c1f025
|