Technical requirements
It’s important to note that one important piece of technology we have ignored is a database. In reality, whether using the Robo-advisor for yourself or building a consumer platform, you’ll need to persist all these objects that you are creating and interacting with. For a personal project, the simplest approach would be to persist your data in a JSON or Pickle file, but a more robust solution would be the sqlite3
database that comes packaged with Python itself. Third-party modules such as pydapper
make it easier to store and query our existing custom classes by using them as Python dataclass
models directly. You could get fancier with a NoSQL solution such as MongoDB, which uses dictionaries that can be easily passed to APIs as JSON files.
The other note to make here is on APIs themselves. As we are not implementing a frontend, we are interacting directly through Python code in all our examples. If that isn’t ideal for your Robo-advisor...