r/Pyfinance • • Sep 07 '23

Are You In? LayerZero Airdrop Eligibility

111 Upvotes

r/Pyfinance • • Jul 28 '17

25 Most Popular Algorithmic Trading Strategies Implemented by the Quantopian Community

Thumbnail
blog.quantopian.com
25 Upvotes

r/Pyfinance • • Jul 31 '17

Trading Logic with Sentiment Analysis Signals - Python for Finance 10

Thumbnail
youtube.com
17 Upvotes

r/Pyfinance • • May 06 '21

TvDatafeed: A python​ library to download historical​ data​ from Tradingview

Thumbnail
youtu.be
16 Upvotes

r/Pyfinance • • Jul 29 '17

Join us at ##pyfinance in freenode for real-time python algorithmic trading discussion

13 Upvotes

Freenode chat: ##pyfinance

Download the free IRC client Hexchat to join ##pyfinance without having to manually log in every day


Also, freenode ##pyfinance link in the sidebar is now fixed


r/Pyfinance • • Aug 21 '21

I made a Python bot that follows stock trends on /r/wallstreetbets, and you can use it too.

12 Upvotes

I made a bot that analyzes comments on Reddit in search of upcoming stock trends.

This is still just half automation, but I find it really useful.

The stack I used is a python server, hosted on Oracle free VPS + an Oracle free Autonomous DB. The code is based on this project:

RyanElliott10/wsbtickerbot: Reddit Bot for to scrape for the most mentioned tickers on the r/wallstreetbets subreddit. (github.com)

Every 10 minutes the bot reads the latest 100 comments, analyzes them for sentiment rating, and inserts them into the database. There are plenty of cool things that I can do with the data and implement in the future:

  1. Scan more subreddits (r/stocks, r/spacs etc..)

  2. Analyze news websites and other sources (the text parsing is pretty generic, split a string by regex, that's all...)

Other interesting projects:

dwallach1/Stocker: Financial Web Scraper & Sentiment Classifier (github.com)

alvarobartt/twitter-stock-recommendation: Simple Stock Investment Recommendation System based on Machine-Learning algorithms for prediction and Twitter Sentiment Analysis. (github.com)

3. Backtesting using this bot

4. Take upvotes/likes/retweets into consideration, higher upvotes -> higher exposure.

There are still a few false positives but it works quite well.

List of python packages:

asyncpraw,
vaderSentiment,
discord,
terminaltables,
pandas,
sqlalchemy,
discord-py-slash-command,
cx_Oracle

For now, I am displaying the results on Discord only, you are free to join the server and use it, have fun guys :)

* Try to run the `$analyze` command every few hours to see the numbers change, it's really cool!

https://discord.gg/wDcGJzfe2t


r/Pyfinance • • Mar 22 '21

Top Best/Worst Performing Stocks with Python

Thumbnail
glaucocustodio.medium.com
11 Upvotes

r/Pyfinance • • Jul 31 '17

Simple Machine Learning Example [Trading Strategy] Mk II @ Quantopian

Thumbnail
quantopian.com
11 Upvotes

r/Pyfinance • • Jul 28 '17

Please message me with your credentials if you would like to be a mod.

11 Upvotes

My credentials: I'm a software developer. I build software at a local python shop and I also have my own company (educational game development, education, and AI research). I have been studying finance for many years but have yet to begin trading. I would definitely like some help with moderation from traders and other software developers.


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 • • Sep 15 '17

Masters thesis Machine Learning algorithm

10 Upvotes

I figured this might be a good place to seek help. I'm in the process of proposing a masters thesis for the course I am doing. My undergrad was in finance and accounting and I qualified to do a Masters in IT conversion course. One of the topics for the thesis is a ML algorithm to predict the price of banking stocks on our local stock exchange (JSE). I only have about 6 months worth of python knowledge. So my first question is, is it even do-able?

Assuming it is, would this sub be able to offer a bit of guidance? I'm just wetting my toes in this area. My idea was to gather data from the last 3 years on the South African Banking Sector. I think most of this data is available through Bloomberg. Factors I'd like to consider are:

  • Price

  • Volume

  • Interest Rate

  • Rand/$ Exchange Rate

  • Inflation - CPI (possibly, not sure if necessary)

  • Then perhaps a mixture of ratios such as PE, interest margin, bad debts %, impairment % and non-interest income %

From this I need to write out an executive summary, research questions, methodology and how I will evaluate the results. I'm pretty nervous about taking this on as it feels I may be biting off more than I can chew. I haven't been able to come up with a simpler research question though (maybe you guys can?) and its the only topic that relates finance to IT. So for now I'm stuck with it.

The proposed topic suggests using 3 different types of machine learning algorithms (SVM, NN and Back Propogation) to predict movement in the prices of shares. I've been reading some papers and this all just seems way to advanced for my current knowledge.

I know this isn't perhaps the best post, and may be missing some information. I haven't written it in the best state, but if you need any more information let me know and I will provide what I can.

Thanks


r/Pyfinance • • Mar 29 '20

Want to get all publicly traded tickers without having to manually download stuff? get_all_tickers is the Pip package for you.

9 Upvotes

Hey guys, I created a Pip project that allows you to get all publicly traded tickers on NYSE, NASDAQ, and AMEX. Link here: https://github.com/shilewenuw/get_all_tickers

UPDATE: support has been added for all continents, not just for US


r/Pyfinance • • Jan 27 '18

Does anyone here do any cryptocurrency trading?

9 Upvotes

What general strategies do you employ?


r/Pyfinance • • Sep 12 '19

HFT

8 Upvotes

Can anybody please share links or resources for HFT .

Thank you in advance


r/Pyfinance • • Aug 04 '17

Best back testing framework for algo trading in Python

Thumbnail
quantlabs.net
7 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 • • Jul 24 '21

I Built A Crypto-trading Bot Network w/ Python, Binance API, Linux VPS, & A Lot of Tears - Results Are Now Great - I Plan to Make More Bots & Keep Them Running 24/7

Thumbnail
youtube.com
6 Upvotes

r/Pyfinance • • Jun 28 '20

Automated trading based on a strategy - TDA or IB or TS

6 Upvotes

Having tons of money in day trading, I have started looking for automated entries. I have signed up with Interactive Brokers and tried QTPylib, but its not any close to practical use.

I have also signed up with Trade Station to see if the strategy trading works.. No luck.

Any suggestions on how to get entries and exits with simple strategies?

Thanks!


r/Pyfinance • • Jul 31 '17

Python algo on CloudQuant using DeMarkIndicators

Thumbnail
info.cloudquant.com
6 Upvotes

r/Pyfinance • • Aug 15 '21

Exchange and Market calendar updated for NYSE holidays back to 1885

5 Upvotes

The pandas_market_calendars package has now been updated for NYSE holidays, late opens and early closes back to 1885.


r/Pyfinance • • May 17 '21

How applicable are the models learnt in undergraduate econometrics to problems outside of social science issues/experiments?

5 Upvotes

Sorry if this is not the right community to ask this in, but, I'm currently a second year finance and economics student, studying at a quality university with a higher focus on quantitative methods. I have already studied an elementary econometric course covering regression, multiple regression, binary, logit and probit etc, etc. In the next year or so I will have the option to choose some more intermediate level to advanced econometric courses. I'm just wondering how applicable the models ill learn in econometrics are to issues outside the social science spectrum? That is, the application of econometric models to data for purposes of non-formal analysis, maybe even call it "recreational analysis". For example, i know that certain models when meeting certain conditions, can be applied to social science type issues/experiments, but what if i wanted to try leverage econometric modelling to perform analysis on more niche things such as sports (like is presented in moneyball for example) or even other games such as card games or stocks(though i know econometrics is already prevalent here). I love finance and have an avid interest in statistics, stata and other programming languages, and want to deepen my statistical modelling capacity beyond that of regressions, etc. I am really considering chasing this pathway, however, i am worried that the absence of applicability to anything outside of social science type experiments , in addition to a high focus on theoretical content over practical implementation will lead to growing boredom of the subject if i were to study it. Hence, why i ask whether what i learn can be to at least some extent applied to recreational type "experiments", where my knowledge feels more tangible as i can actively apply what i have learnt to things that can be analysed with statistics and that are of interest to me, outside on my studies of course.


r/Pyfinance • • Sep 08 '20

I am looking for resources to backtest Option Strategies🤖👨‍💻

5 Upvotes

It's been kinda hard for me to find good info regarding historical prices of options but yeah.

If anyones has suggestions on were to go or some tips while testing it will be great!

Thanks for any help


r/Pyfinance • • May 15 '20

Algorithm optimization

5 Upvotes

Algorithm optimization

We’ve built an algorithm based on volatility and some other parameters but we feel that it needs more fine tunings and optimization of the parameters .Could you advice what pandas could be useful? May be some other tools ?


r/Pyfinance • • Nov 14 '18

Customise Excel context menus with Python

Thumbnail
pyxll.com
5 Upvotes