Free for 90 days: Sign up now and get 90 days managed free after your first deposit. See offer details

Coming soon: our new one-on-one advice packages. Learn more

Now available: our new one-on-one advice packages. Learn more

Get your entire Smart Saver balance managed free for 3 months. Enroll today

Get your entire Smart Saver balance managed free for 6 months. Enroll today

Introducing Smart Saver: You could earn 1.83% with our low-risk investing account for your extra cash.* Learn more

Engineering at Betterment

A Software Engineer Is Born And Other Tales From My Internship

In my software engineer internship at, I not only learned to code Python, I also learned about working in a laid-back tech office. (Hint: You’d better like ping pong and dogs.)

Articles by Kristina Hu

By Kristina Hu
  |  Published: October 7, 2013

If you want to do an internship, don't be afraid to try new things.

Headphones are essential gear for a programming job.

Here's the bottom line: Learn more about Betterment internships

This post is part of series of articles written by Betterment’s 2013 summer interns.

When I first applied to work at Betterment as part of their software engineer internship program, I knew close to nothing about what my future career goals were. And while I’m still figuring them out (hey, I’m only 18!) the internship was a great way to apply what I have been studying at Harvard, where I am majoring in statistics and economics.

Mini-golfing with the Betterment team this summer.

One of the coolest projects I worked on last summer involved writing a Python script that generated financial models of Betterment’s portfolio performance for varying risk allocations, time horizons, and client investment levels for the company’s website. (If you don’t know what Python is, it’s not a big snake. Rather, it’s a object-oriented programming language comparable to Java.)

My task was to develop a script to automate the data retrieval behind Betterment’s past performance widget on a monthly basis. The widget uses dividends-adjusted historical market data to calculate the portfolio’s performance over time.

Most importantly, this widget is featured prominently on the company’s website and the information is useful to customers when they make an investment decision.

Learning a new language

Coding in Python wasn’t something I had much experience with, but when Product Manager Alex Benke asked me to take on a project involving scripting for the investing team, I jumped at the opportunity to learn it.

On the front end (that’s what the customer sees), the widget’s sliders and toggles (programmed in JavaScript) allow a customer to input his or her own information, like a starting investment amount, monthly deposit and asset allocation. All those inputs affect the shape of the curve to the right.

On the back end (where the heavy lifting is done), this data is stored as two static JSON objects—(JSON is a kind of database protocol)—generated by weaving together each ticker’s returns as a single “mega-stock” or “mega-bond” time series weighted by its share in its basket. It’s sort of like making two braids out of different yarns with varying thickness.

Mastering data

But making these “braids” was not as easy as it seemed at first.  Querying, storing, and manipulating the ticker data presented many challenges. In particular: Where and how would this data be stored?  How flexible is this tool for portfolio changes?  How easy would it be ensure the accuracy of our data?

After querying the Yahoo Finance API for prices, I also needed to calculate monthly returns, track portfolio growth over time, and rebalance the portfolio at every end of quarter.

This task turned out to be the perfect opportunity to apply what I had learned in another project I had worked on using Google Spreadsheets as a cloud-based database system.  By manipulating individual worksheets, rows and cells, I could isolate each step of the process and visualize the results while the script ran.

The result? A simple, sleek script that could be set to run automatically on our servers and injected the updated data seamlessly into the backend of the past performance widget.

Of course, coding was not the only thing I learned this summer. I learned about working in a tech office (you’d better like ping pong and dogs!) and living in New York City.  But after a great summer, I am closer to knowing that I enjoy coding and that it will likely be part of my career.

Recommended Content

View All Resources
Acceptable Reasons for Holding Unused Cash in Smart Saver

Acceptable Reasons for Holding Unused Cash in Smart Saver

When you aren't yet sure when or how to spend or invest your unused cash, we offer Smart Saver, a managed account designed to handle your extra cash.

What’s the Best Authorization Framework? None At All

What’s the Best Authorization Framework? None At All

Betterment’s engineering team builds software more securely by forgoing complicated authorization frameworks.

How We Engineered Betterment’s Tax-Coordinated Portfolio™

How We Engineered Betterment’s Tax-Coordinated Portfolio™

For our latest tax-efficiency feature, Tax-Coordinated Portfolio, Betterment’s solver-based portfolio management system enabled us to manage and test our most complex algorithms.

How would you like to get started?

Your first step toward a smarter investing future starts here.

Create a Betterment account

Go ahead and join the smart, modern way to invest.

See what we can do for you

Tell us a bit about yourself, and we'll show you the benefits of investing with us.

Get a free investing checkup

Help us get a sense of your investing approach and see how you could improve.

Transfer a 401(k) or an IRA

Move an existing retirement account into a Betterment IRA.

Download the mobile app

Enjoy the Betterment experience anywhere on the go.

Search our site

For more information and disclosures about the Betterment Resource Center, click here. | See our contributors.