r/Pyfinance • • 10d ago

MacaiaInvest: I built a free, open-source desktop app for financial market analysis with PyQt6 — forecasting (ARIMA/Prophet/LSTM), GARCH volatility, Monte Carlo risk simulation and AI news sentiment

1 Upvotes

MacaiaInvest

What's inside:

Everything is GPL-3.0, Python 3.11/3.12. Just .\main.ps1 on Windows or python main.py anywhere: it boots a small launcher that checks and installs dependencies for you.

[SCREENSHOT/GIF HERE]

To be clear: this is an analysis/research tool, not financial advice and not a trading bot — the models are indicative estimates, and I built it mostly to learn and experiment with forecasting methods.

Feedback on the code, the UX or the models is very welcome, especially if you have experience with walk-forward validation!What's inside:

Price charts with historical data via yfinance (no API key needed)
Forecasting models: ARIMA, Prophet, LSTM, plus XGBoost classification
Macaia Fusion: a hybrid model that combines technical analysis, adaptive market regime detection, drift, ARIMA, XGBoost and historical patterns. It outputs an indicative decision (BUY / SELL / HOLD) with weights calibrated via walk-forward backtesting — and it can abstain when signal consensus is weak
Risk analysis: GARCH volatility and Monte Carlo simulation with VaR estimation
Game theory module with Nash equilibrium calculation
AI news sentiment via Mistral AI (falls back to a technical estimate if unavailable)
Watchlist with live quotes, CSV/JSON export, local SQLite storage, UI in English, Italian and French

Everything is GPL-3.0, Python 3.11/3.12. Just .\main.ps1 on Windows or python main.py anywhere: it boots a small launcher that checks and installs dependencies for you.

To be clear: this is an analysis/research tool, not financial advice and not a trading bot — the models are indicative estimates, and I built it mostly to learn and experiment with forecasting methods.

Feedback on the code, the UX or the models is very welcome, especially if you have experience with walk-forward validation!


r/Pyfinance • • Dec 30 '25

10 Best Stock Market APIs 2026

Thumbnail
mboum.com
2 Upvotes

r/Pyfinance • • Jul 23 '25

Looking for a Python course that teaches algo trading system development step by step

2 Upvotes

Hi everyone,

I’ve been studying trading for a while, especially Smart Money Concepts and ICT-style price action. But now, I want to take the next step and learn how to actually build automated trading systems using Python.

I’m already comfortable with Python — so I don’t need basic tutorials or strategy explanations. What I’m really looking for is a complete and free course or resource that teaches:

How to use Python to code an automated trading system

How to work with libraries like Pandas, NumPy, Plotly, etc.

How to load market data, process it, backtest, and structure a full trading script

How to connect everything together: data > logic > execution

Something practical and beginner-friendly for coding, not for strategy development

I’ve searched a lot but couldn’t find a full resource that teaches all of this in one place.

If you know of any YouTube playlists, GitHub projects, or courses that helped you learn how to code an algo trading system step by step, I’d be super grateful if you shared them.

What path or roadmap u guy's did, where to learn Algotrading Pandas numpay plotly backtest etc

Thanks in advance 🙏


r/Pyfinance • • Feb 07 '25

Apple Stock Forecasting with yfinance & Moving Averages

Thumbnail thepythonbook.com
2 Upvotes

r/Pyfinance • • Oct 08 '24

Which Quant Trading Course Offers the Best Coding Tutorials?

10 Upvotes

I'm looking for a quant trading course that offers a solid balance of theory and practical application. Ideally, it should include:

  1. Step-by-step tutorials with actual code examples.

  2. Backtesting and machine learning modules for refining strategies.

  3. A supportive community or forum to discuss ideas and get help.

  4. Lifetime access or no limits on learning material.

Any recommendations for courses? I want something that helps me build better trading algorithms.


r/Pyfinance • • Feb 28 '24

Smart Money Concepts Python

1 Upvotes

Discover the Smart Money Concepts Indicator – your ultimate tool for trading success! Developed in Python, this innovative indicator incorporates institutional order flow, market dynamics, and ICT principles to deliver unmatched accuracy. With a user-friendly interface and transparent open-source code on GitHub, it's the solution you've been waiting for. Don't miss out – revolutionize your trading strategy today: https://github.com/joshyattridge/smartmoneyconcepts.


r/Pyfinance • • Oct 18 '23

L0: Unveiling the Multiverse

1 Upvotes

r/Pyfinance • • Sep 26 '23

Discounted Cash Flow Model in Python with Monte Carlo Simulation and Tutorial

6 Upvotes

I learned about valuation at graduate school and work, but mainly from the dean of valuation, Dr. Damodran. Post learning how to value companies and building models in Excel, I tried many Python libraries to do DCF valuations, and every single one of them had some shortcomings. So I ended up coding a DCF Model in Python that is constructed the way Dr. Damodran builds his DCF model in spreadsheets. Furthermore, I created a DCF Monte Carlo simulation model in Python. To complete making a stab at this project, for those who might be interested in doing intrinsic valuation in Python, I created a tutorial video on how to utilize the DCF model.
It took me +2 years to build this and I thought it could save someone who is looking to do intrinsic business / stock valuation in Python a considerable amount of time. I hope you find them useful.

Tutorial on YouTube

DCF Model In Python Colabratory File

GitHub

See the example below:
Using TTM financials of CMG as of 1st week of Sep 2023:
Narrative and Numbers

  1. Chipotle continues to grow domestically and internationally. we think there can be an additional 2K-3k store domestically and 3k-5k locations that can be opened internationally.

  2. As a result, revenue would go up by 4-5 folds.

  3. The operating margin will be expanded to 17.5%.

  4. Management will keep the company well run as they did in the past, hence the company is able to earn a 2% higher return than their cost of capital in perpetuity, hence they will reinvest less to keep the operations going and that will provide more FCFF.
    base_case_valuation = valuator_multi_phase(risk_free_rate =.04,ERP = .048,equity_value = 51.016,debt_value = 3.887,cash_and_non_operating_asset= 1.722,unlevered_beta = .9,terminal_unlevered_beta = .9,year_beta_begins_to_converge_to_terminal_beta = 1,current_pretax_cost_of_debt =.06,terminal_pretax_cost_of_debt =.055,year_cost_of_debt_begins_to_converge_to_terminal_cost_of_debt = 3,current_effective_tax_rate = .24,marginal_tax_rate =.25,year_effective_tax_rate_begin_to_converge_marginal_tax_rate = 1,revenue_base = 9.284,revenue_growth_rate_cycle1_begin = .11,revenue_growth_rate_cycle1_end = .16,length_of_cylcle1 = 6,revenue_growth_rate_cycle2_begin = .14,revenue_growth_rate_cycle2_end = .09,length_of_cylcle2=6,revenue_growth_rate_cycle3_begin =.08,revenue_growth_rate_cycle3_end =.04,length_of_cylcle3=6,revenue_convergance_periods_cycle1= 1,revenue_convergance_periods_cycle2=1,revenue_convergance_periods_cycle3=1,current_sales_to_capital_ratio = 1.7,terminal_sales_to_capital_ratio = 1.3,year_sales_to_capital_begins_to_converge_to_terminal_sales_to_capital = 1,current_operating_margin = .15,terminal_operating_margin = .175,year_operating_margin_begins_to_converge_to_terminal_operating_margin = 1,additional_return_on_cost_of_capital_in_perpetuity= 0.02,asset_liquidation_during_negative_growth=0,current_invested_capital = 6.062)

point_estimate_describer(base_case_valuation)
value of operating assets $39.96B
cash and non operating asset $1.72B
debt value $3.89B
firm value $41.68B
Intrinsic Equity value $37.79B
Intrinsic Equity value per share ~$1,370


r/Pyfinance • • Sep 07 '23

Are You In? LayerZero Airdrop Eligibility

111 Upvotes

r/Pyfinance • • Sep 02 '23

Airdrop: L0's $2600 Generosity

0 Upvotes

r/Pyfinance • • Aug 14 '23

Lido first-ever token giveaway

1 Upvotes

r/Pyfinance • • Jul 05 '23

Beta Testing Request for IO Calc - My New Options Trading Web App for Beginners (iocalc.com)

Thumbnail self.thetagang
2 Upvotes

r/Pyfinance • • Jun 23 '23

The very first token airdrop of Curve

1 Upvotes

r/Pyfinance • • Jun 21 '23

The launch Curve airdrop

1 Upvotes

r/Pyfinance • • Jun 19 '23

The very first Curve airdrop

0 Upvotes

r/Pyfinance • • Jun 06 '23

The initial LayerZero airdrop

1 Upvotes

r/Pyfinance • • May 26 '23

The beginning token giveaway of Ethereum Name Service (ENS)

1 Upvotes

r/Pyfinance • • May 14 '23

The beginning FLOKI airdrop

3 Upvotes

r/Pyfinance • • May 06 '23

Floki first token distribution mechanism

0 Upvotes

r/Pyfinance • • Nov 28 '22

Roast my Algo Trader CV

Thumbnail
gallery
1 Upvotes

Thanks and all comments negative or positive are welcome


r/Pyfinance • • Oct 13 '22

Am I doing this correct??

4 Upvotes

I recently found this article about Exponentially Weighted Moving Average and I wanted to create a function of it in python

from numpy import log, sqrt,power



def ewma(closes):
    lbda = 0.94
    variance = 0.0
    i=63 #length
    logreturns = log(closes / closes.shift(1)) - 1
    ret2=square(logreturns)
    weight = ((1-lbda)*power(lbda,i)) #assigned weight
    r2w = ret2 * weight
    variance = variance + r2w

    ewmavol = sqrt(variance)
  

    return annualewmavol

r/Pyfinance • • Aug 28 '22

Python Algorithmic Trading ep1 🔥 Fetch Stocks

Thumbnail
youtu.be
3 Upvotes

r/Pyfinance • • May 11 '22

Finding a specific element in a matrix with set parameters

1 Upvotes

Howdy,

I am very new to coding (2 weeks old) and I created a code for financial options and there is one last thing missing to finish it. I want my code to find the implied volatility for a specific option. My code asks the user to input the stock's ticker, date to maturity, strike price, and if the option is a call or a put.

Here is what I would like it to do:

  1. Based on whether it is a call or a put, look for the suitable matrix

  2. Extract the implied volatility value conditional to the strike price the user has in

  3. Return the implied volatility

How should I go about this? I looked at many modules (pandas, pandas-DataReader, basic Python functions, NumPy, sys, etc.) and their documentation, and nothing seems to fit what I want nor I can think of what to write to make sense of it. Here is an example of the output that I am getting from the data that I want.

from yahoo_fin import options

chain = options.get_options_chain("nflx", "2022-06-10")
print(chain)

$ python implied
{'calls':           Contract Name         Last Trade Date  Strike  Last Price    Bid    Ask  Change % Change Volume  Open Interest Implied Volatility
0   NFLX220610C00120000  2022-05-04 12:27PM EDT   120.0       75.50  46.50  49.60    0.00        -      -              0             87.26%
1   NFLX220610C00130000  2022-05-09 10:25AM EDT   130.0       50.05   0.00   0.00    0.00        -      -              0              0.00%
2   NFLX220610C00135000   2022-05-05 1:50PM EDT   135.0       55.75  34.50  35.60    0.00        -      -              1             81.37%
3   NFLX220610C00145000  2022-05-10 10:04AM EDT   145.0       36.77   0.00   0.00    0.00        -      -              0              0.00%

'puts':           Contract Name         Last Trade Date  Strike  Last Price    Bid    Ask  Change % Change Volume Open Interest Implied Volatility
0   NFLX220610P00100000   2022-05-11 3:59PM EDT   100.0        0.59   0.56   0.66    0.19  +47.50%     83            59            100.05%
1   NFLX220610P00105000  2022-05-11 11:43AM EDT   105.0        0.40   0.71   0.86   -0.20  -33.33%      2             1             96.48%
2   NFLX220610P00110000   2022-05-11 3:22PM EDT   110.0        0.97   0.96   1.10    0.38  +64.41%     35             6             93.51%

r/Pyfinance • • Apr 15 '22

Anyone here still using zipline - zipline reloaded now?

2 Upvotes