Great work sharing your process! How do you decide when to stick with a simple for loop versus optimizing with Pandas or other libraries?
When a For Loop Powers Your Stock Backtester - Devlog
Suleyman Sade
●4 ●32 ●42
calendar_today
• schedule3 min read
— Originally published at python.plainenglish.io
2 Comments
Suleyman Sade
•
I would normally rather using the optimized Pandas approach almost always, but as I mentioned in the post I stick with a for loop partially because it is easier to read. But the other underlying reason is because I couldn't exactly figure out how I would record day to day price changes with the pre-recording approach. I didn't spend too much time into this since the regular for loop approach worked fast enough.
Please log in to add a comment.
Please log in to comment on this post.
More Posts
- © 2026 Coder Legion
- Feedback / Bug
- Privacy
- About Us
- Contacts
- You Tube
- Tiktok
- Premium Subscription
- Terms of Service
- Early Builders
chevron_left
14Posts
18Comments
11Connections
A student passionate about programming and AI who likes to write about these topics.
More From Suleyman Sade
Related Jobs
- Open Application: Explore Your Future with KunaiKunai · Full time · United Kingdom
- Open Application: Explore Your Future with KunaiKunai · Full time · United Kingdom
- Spanish Educational Video Scriptwriter / Instructional Content DeveloperIdlewild Co · Full time · Charleston, WV
Commenters (This Week)
bryanhamiltondevverified
10 comments
Marcelo Moreira de Lima
1 comment
zeekwrites
1 comment
Contribute meaningful comments to climb the leaderboard and earn badges!