QuantitaveFinanceExamplesPy
Financial analysis, algorithmic trading, portfolio optimization examples with Python (DISCLAIMER - No Investment Advice Provided, YASAL UYARI - Yatırım tavsiyesi değildir).
Install / Use
/learn @mrtkp9993/QuantitaveFinanceExamplesPyREADME
QuantitaveFinanceExamplesPy
Financial analysis, algorithmic trading, portfolio optimization examples with Python
DISCLAIMER - No Investment Advice Provided
YASAL UYARI - Burada yer alan yatırım bilgi, yorum ve tavsiyeleri yatırım danışmanlığı kapsamında değildir.
Requirements
Please install requirements from requirements.txt.
References (for both methods and some code fragments)
- Hilpisch, Y. J. (2021). Python for algorithmic trading: From idea to cloud deployment. O'Reilly.
- Jansen, S. (2020). Machine learning for algorithmic trading: Predictive models to extract signals from market and alternative data for systematic trading strategies with python. Packt Publishing.
- Pik, J., & Ghosh, S. (2021). Hands-on financial trading with python. Packt Publishing.
- Velu, R. P., Hardy, M., & Nehren, D. (2020). Algorithmic trading and quantitative strategies. CRC Press, Taylor & Francis Group.
- Brugiere, P. (2021). Quantitative portfolio management: With applications in python. Springer Nature.
- Dowd, K. (2007). Measuring market risk. John Wiley & Sons.
- Hilpisch, Y. J. (2020). Artificial Intelligence in Finance. O'Reilly.
Contact
Murat Koptur, LinkedIn
Email: muratkoptur@yandex.com
Examples
Note: In all examples, assumed the risk-free rate is zero.
Calculation Alpha and Beta factors

Cointegration
ARCLK.IS and TOASO.IS has cointegration, p-value: 0.04903369798110527
AYGAZ.IS and KCHOL.IS has cointegration, p-value: 0.007029900251131765
FROTO.IS and MAALT.IS has cointegration, p-value: 0.015757028038897322
FROTO.IS and OTKAR.IS has cointegration, p-value: 0.004399007493986555
KCHOL.IS and AYGAZ.IS has cointegration, p-value: 0.007101145930953294
MAALT.IS and FROTO.IS has cointegration, p-value: 0.00783799297255268
OTKAR.IS and FROTO.IS has cointegration, p-value: 0.003094678911810982
OTKAR.IS and TTRAK.IS has cointegration, p-value: 0.04185601871282213
OTKAR.IS and YKGYO.IS has cointegration, p-value: 0.00282083357242191
TTRAK.IS and OTKAR.IS has cointegration, p-value: 0.03639137062922606
TTRAK.IS and YKGYO.IS has cointegration, p-value: 0.03834839887528665
YKGYO.IS and OTKAR.IS has cointegration, p-value: 0.0017665073676291331
YKGYO.IS and TOASO.IS has cointegration, p-value: 0.046004150077470406
YKGYO.IS and TTRAK.IS has cointegration, p-value: 0.027200620035757236
PCA on Returns

Volatility calculations
Std.Dev. Estimator: 0.16988244687319595
Classical Estimator: 0.0013349197336295028
Rogers - Satchell Estimator: 0.0009643228704150725
Yang - Zang estimator: 0.0016329397449278639
Volatility-Volume Relationship

AR-ARCH models for volatility

VWAP
Technical Indicators

Denoising Data

Trading Signals

Backtesting

Pairs Trading

Modern Portfolio Theory - Efficient Frontier

Value-At-Risk - Expected Shortfall

Related Skills
claude-opus-4-5-migration
109.5kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
349.2kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
TrendRadar
50.9k⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
mcp-for-beginners
15.8kThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
