Hello everyone, I am Abhinanda and I am Product Engineer at Gojek. So before we start like let's do a quick recap of the day. So we started the day with Arun stock on the different strategies that you can use to optimize your network performance. And then the next stock was by Pratul. It was about the best practices that you can have, how to improve your culture and everything. And then we moved on to talk from Mintra about the progressive web apps and their future. After that we had a discussion on how to scale the mobile apps and there was a final discussion. And then we moved on to the security talk from attackers perspective. Then next was the lotty talk here and here we are to the last talk about the CI CD. So this talk is our journey or so it's like my thoughts about our journey at Gojek about in the that we had in the mobility. So about me, I started at the backend team in Gojek by working on Golan, JRuby and all. Then after sometime I moved to the DevOps and infrastructure automation team. I was working there on Chef, Ansible and the different cloud platforms. And then since the last one and a half year I am part of the Android and the release engineering team at Gojek. So I have used my learnings from the previous teams that I have worked with in the Android team currently. Also my talk is inspired from my previous talks at RootCon fan, DroidCon Poland that I have given in the last year. Gojek has grown by 900x times in the last 18 months that is like 90,000% and Gojek is app only platform. We only have apps the Android app and the iOS apps on Play Store. So we don't have any website. We have close to 50 million downloads on both the stores combined. So this talk is not about Gojek. This talk is not about growth. This talk is not about the products that we have at Gojek. So this talk is about mobile team journey. So to make this amount of growth possible mobile team played a key role. And so in this talk I will be like explaining how did mobile team evolve or what are the changes that we had in the mobile team to make this thing possible. So coming to the fundamental question, what changed? Can anyone guess? So we started small with few engineers, a very small problem that is like solving a transportation problem for Indonesia. And then now we are at 50 million downloads and solving multiple problems, more complex systems we had and we have more engineers. So there is something that is changed, right? So from the version one of our app to the current version that is 2.28 on Play Store. There is a big change. It's not just the app that we see here and here, this is the change. Behind the scene there is something big that is change in the last 2 years as we grew. So what is that change? So that change is the way we work in our mobile team. So the way we used to work previously when I joined the mobile team and the way we work now, this changed basically. So yeah, so these are the things that also change in the way we work in the mobile team. That is the tools that we use now, the app architecture, the team structure that we have currently, the development workflow that we follow now and the different processes that evolved as we grew. So I will be covering all of them in the upcoming slides. There was one core change which was a driving force that was responsible for all the changes that I mentioned in the previous slide. What was that change? That was moving from nothingness to CI CD. So as like every other startup, we also started small. There was no CI CD practices or tools available, we were not using any tools. And then as we grew there was a need of moving to CI CD. So then we started following the CI CD practice. Previously we did everything manually. We used to build the app on one developer machine and then upload it to play store and the app store. We used to do all the testing once the app is built on that developer's machine and then delivered it to the QS. So from that to following the CI CD practice automating everything, this is what was the core change that we had at work. And then we grew further. We migrated from one CI CD tool to another CI CD tool. This was another change. So this was mainly driven by the requirements or the problems that we were facing at that time. When we decided to experiment with something else and then evolve our practice. So why did we do it? We migrated from Bitbucket to Jenkins. Bitbucket plus Jenkins setup that we were using previously to GitLab. So why did we do it? What impact we had after moving to GitLab? And what were the advantages of using GitLab over Bitbucket and Jenkins for us? And how did this setup help us to scale and grow? How did it simplified everything for us? And I'll be covering all these answer to all these questions in my upcoming slides. Before we move on for those of you who don't know what CI is or just a basic refresher on what is continuous integration. This is the textbook definition from the Jeff Humble's continuous delivery book. That continuous integration is a development practice that requires developers to integrate code into a shared repository. So you have to have a Git repository where everyone in the team who are working on the code base needs to check in their code. And then once that this code is there, it is automatically verified by the tools, automatic testing tools, whether you run unit test or integration test or UI test. And so how does this help? But since we have testing on every command, this helps us to detect problems easily. So that since the problems are detected early, that could be solved early. Which was not the case when we had, we did not had any CI practice. So CI is a development practice that we should follow. Which tool to choose is a question. So there are a lot of tools in the market. You can choose any of them. Whichever fits best for your organization that works for you well, you choose it. There is no hard coded or defined guidelines. If you, you can start with as small as, spin up a docker container on your own box of a image. You can say a Jenkins image or any image and spin up that docker container. You can run the CI. No issues. Or you can host your own CI setup. Or you can use any of the already hosted CI setup available. So it all depends on your scale, your requirements and whichever tool your team is comfortable using it. So that system has to be very easy to use, configure and it has to have a good support and a community around it. These are the few things that you can keep in mind while choosing the CI tool for your. So these are the benefits that helped us to move to CI. Like we had this big problem of since it was the last day before the release when all the code was merged. There were some bugs which were, we were not able to catch them. So now after moving to CI, we are able to catch these bugs early. And also since we can catch them early, we can fix the problem early. CI also gives a big advantage of having, creating a visibility in the organization. So there is a dashboard and everyone in the organization can view it. So if you are having multiple teams working on the same code bit, you can have a dashboard. If there is something wrong, if the build is broken or the build is read, then people know, ok, we have to fix it. And then this CI also helps us to create a solid foundation. So you spend less time in debugging things and building more features. So and the next advantage is you don't have to wait for anything. So just push your code and CI will build it, test it and yeah, that's it. You, once you have the build finished, pipeline is completed, then you have the reports and the results. If the build fails, then you need to look it, otherwise CI does it for you. This will help you to deliver your features rapidly. To start following CI, seed in your organizations, you need to follow these practices. These are again from the continuous delivery book by Jess Humble. So these are the practices that you need to follow your working on CI. So developers check out code into their private workspace. So since it is a single gate repository and yeah, this is the most important one. It has to be a repository, shared repository. It cannot be Dropbox. It cannot be pendrive that you are ok or it cannot be a developer machine. So you are passing on the code around the FTP server or something. It has to be a version repository. So once developers check out that, pushes the commit or makes a commit to that repository. That whole source code is taken by the CI tool and CI tool builds it. Once the build is finished, it does the unit testing. And then after the build is done, we have the artifacts. It passes on the artifacts to the next phase of the CI practice that is testing. So this testing phase then runs the integration test or the UI test and other different kinds of tests that you have in the pipeline. Once yeah, next one is the build has to be self-testings. The testing has to be integrated on CI. If there is no testing on the CI, you cannot follow that practices. It has to be automated in some manner. You can start small in the beginning but yeah, you have to add more and more tests and more and more kind of tests later.  If there are any broken builds, then you have to fix them immediately. Next one is the build has to be fast. The whole concept of CI CD is based on feedback. The faster the feedback is, the faster you get the reports and analysis, it would be better for you. CI server also assigns a build label to every build or every artifact that it produces. And if the build is successful, it informs the whole team via some kind of mechanism, whether it is a dashboard or it is an email or it is a Slack integration. It informs everyone in the team if the build is successful and if the build fails also then also it informs. And if the build fails, the team has to fix it. Since I also mentioned in the advantages or benefits that everyone can see what is happening. There is a dashboard, the CI dashboard has to be hosted publicly, at least internal to the organization. It does not have to be a private IP with username, password, base, access that only the admin can see it and he will only monitor the build. Everyone needs to have the visibility in the organization. And then you can automate the next steps that is like the project. So, you as in team members, if you are working on CI practice, then what are your responsibilities? Check in as frequently as you can, make small commit so that if there are any bugs or problems, they are detected early. Don't check in broken code. First, make sure the build or the test runs successfully on the local box. Then only you push it to the remote repository so that CI can build it. Also, don't check in the untested code. Don't check in when the build is broken. If the build is already red and you have seen that, then don't push the code to make it more problematic to debug, whether your commit costs the build to fail or the previous one. Also, the last one, don't go home after checking in. Wait for the system to build to give the feedback to finish the testing and the different. Continuous delivery is just an extension to continuous integration.  So, once you, so let's say you have made the commit and if that commit passes all the phases like it builds the app, it runs a unit test integration, everything passes. And then finally, the app that is built, it is automatically deployed in production in terms of iOS and Android. Let's say it gets uploaded to the app store. So, if you have that kind of automation, then you will call this as continuous delivery. So, why GitLab worked for us? One of the main advantages that we switched to GitLab was the code, the CI and the CD. Everything was at one place. So, we did not have to go to Bitbucket separately to comment and then to review PR and then come back to Jenkins to see the build dashboard and then then again go back to Bitbucket. So, GitLab had this feature of hosting your own source code and then it has its own CI, CD, set of it. GitLab is also open source and it has a very good community. Also, it has two editions available that is enterprise edition and community edition. Community edition is to use, you can host it on your own infrastructure. Or if you also want to use the public GitLab, you can use that. Or if you want to buy the enterprise setup, that will also work. So, open source edition or the community, sorry, not the open source, the community edition has all the features that are required for following the CI, CD practice. So, we decided to use that. It is also easy to use and very easy to set up. And the most important advantage for developers or my team members who are working with me in the Android team is this to configure CI, CD for your own repository whether it is Android or iOS. It is only yamen-based configuration. So, in Jenkins, we used to do it with groovies that was a little bit hard for everyone to understand. Here it is just plain yamen. I will show the pipelines that we have for Android and iOS in my upcoming slides. Yeah, coming back to what changed. So, these are the things that I have mentioned that changed for us at Gojek. So, starting with tooling. Yeah, we introduced automation, integrations like Slack, email, Jira and all. And then alerting and analytics also on the build process. So, GitLab provides all the features. It has like exhaustive set of features in community addition as well that you can use. Then another advantage of GitLab is the multi-runner. It runs on all the platforms. You want to run it on Docker, you want to run it on Mac, Linux, Windows. It has a multi-runner for everyone. I will cover what is the GitLab CI multi-runner and the architecture that I will explain in the upcoming slides. Commonly used tool sets for CI CD are all available in GitLab. And also if there is something you cannot do with whatever is available with GitLab, you can try the external tools that supports integration with GitLab and also GitLab has exhaustive set of APIs like Curl, you can just do Curl request or something and integrate it. We also use Fastlane and Cocoa Word for iOS, building the iOS app and Griddle build tool for building the Android app. So, these are the tools that we are currently using. The next one is app architecture. So, our app architecture also changed when we were in version 1 of the app to the current version that we have. By app architecture, I am not referring here to MVP or MVVM or Redux or Viper. The app architecture here is we switched from a monolithic repo to a multiple repo-based architecture. So, what was a monolithic repo? Or most of you might know that ok, we have just run Android repo, we write all the source code into it and we build that out of it and same for iOS. For us, we started with monolithic repo and it was like soon it turned out to be a very big codebase which was difficult to manage. So, the main problem was the build time. So, we had 20-minute build time for Android and 60-minute build time for iOS. It is a big build time. If you are a developer and you have to wait for 20 minutes, after making just one change and then test that, it is a big build time. So, we needed to have a way so that at least this build time reduces. So, and then on the day of the release, at least like two or three days before the release, it was a big PR help. All the developers like used to send PR and then you have to review them, merge them and sometimes it used to take even like four or five days to get all the things merged and then test it and then do the changes and then reduce. It was also difficult to track changes. Since like the app is scaling, we had so many features and also there were so many changes. It was so much difficult to track in one single. Also, the code was helicoupled since everything was there in one single repo. So, we needed to split it. So, how did we split it? Like, so we broke this Android and iOS repo, the monoliths into roughly 40 product reports. So, what I mean by product repo is, so each repo in iOS and Android will be a product repo and we have different products, go pay, go ride, go food, go mart and all. So, each of them were having a source code relevant to that product only. There were some duplications and all. We tried to mitigate that using some of the repos that were having a common code relevant to like let's say 4 or 5 product repos and then including that module into it. So, the advantage now is the code is decoupled. It's easier to work. You know that okay, if you are working on a go food repo, the code is only related to go food. This also led to faster development cycle. So, and then all these 20 iOS and Android repos now deployed the artifacts. So, we now build ARs or the artifacts and then we push them to the artifact. So, these are the product repos that we have at GoJet. So, starting with auth, base, booking box, busway, food mart, home, paypoint, school stuff, you know. And then these are the two repos, common config and mobile code checks where the common code that is needed by all the repos is there. And similarly for the iOS also, we have different product repos. And once we have this GoJ consumer app Android and GoJ consumer app iOS, this is the final app container. This is the final app that uses all the rest of the 18 or 19 modules to build the. The advantage now is every product had its own CI CD setup. Previously we had just one pipeline and now each product can work in isolation. They have their own CI CD setup so that we can get more fine-grained metrics to track the test coverage and other things. Also like now the product teams are after this architecture change, the product teams are now more aligned. So, let us say Gopu. Gopu has some feature and if it wants to participate in the release, they can work independently and they can decide whether they are ready to participate in the release cycle or not. Previously it was like, if there is a last moment change, it was difficult to like revert if it was a model. So, those kind of small add-ons. Then now the productivity also increased, right. Previously everyone, all the developers are working on one single code piece and now you have to just work on the smaller subset of the code piece. And then finally all the modules get smushed and into the final app container and that is like tested and then released to Play Store. So, yeah, we use Artifactory, JFrog Artifactory for dependency management. So, yeah, I have mentioned the common context. So, these grader files, so everything that we did, breaking into multiple reports from a monolith, most of the things we were able to like do it with grader. So, like mobile code checks, so all the Lintrules, Feinbergs, PMD, all the checks, automated checks that you need to do for all the reports were here in this files. And then all the dependency management related code was there in the dependency.grader. Yeah, moving on to team structure. Team structure also changed. Previously we had technology specific teams. We had Android team and then we had iOS team. So, and they were working on their monolith reports and then we now have regrouped these product teams into different subsets depending on the product they are working on. So, product team have their own report to work with and they can decide how to participate in the ring. So, it's similar to the microservices concept that we have at back end, breaking one big chunk into smaller teams, smaller code base. And so, now this front end product team is focused only on that product. It does not need to care about what is happening in other product teams and all. This does not mean that we don't communicate with other developers in the organization. We do, but yeah, you are just focusing on your product. The inter team and intra team communication also improved in the multi repo structure and coordinating the release was easy. On the day of the release, all you have to do is just take the build from the CI and upload it to play store because all the code reviews and everything merging, building the final app is done by the CI and that are mostly handled at the team level. So, and final app is also tested before uploading it to play store. So, this is the team that we have currently in every product team we have Android devs, iOS devs, a designer or maybe more than one designer and back end devs, then we have QA, PM and product owners. As I mentioned that our build times were reduced both for iOS and Android from 20 to 1 minute and 60 to 1 for iOS. So, previously it was one repo, we pushed the code, we build the app and tested it, ultimately build the artifacts and then release it. It was all done locally on one developer box. After moving to CI now everything is mostly all of them are handled by GitLab. So, also we did some tweaks around the GitLo to make it work for our organization. So, it is not that this is a practice that I am teaching you to follow this. You can work on this, you can have something better. So, this is just an experiment that we did, it worked for us. Maybe it won't work for us like in the near future. So, currently we are at 50 million dollars and now if we move from 50 million to 1 billion there would be something that we definitely need to have changed. We will face the problems at next scale. So, these are the tweaks that we did. So, we have we follow this 30 to 40 to 50 to 62 convention. So, we have three branches on each product repo and on the final consumer app. So, if you are working on the current feature, you get your code merge to develop and then the artifact is published and that is deployed to the artifact tree. So, stable is the version that has already gone to alpha and then the master is the version that is already in the play store. So, if you are working currently then on the date of the code freeze or on the day of the release cycle, the last date of the release cycle, you just move all your code from develop to stable and then we release the alpha app version and also start the full cycle testing on the stable version. And then after everything is done, alpha app works well and that like the feedback from the store is good then we move that code from stable to master and then finally the app is released from the master. If after going to play store, if there are some bugs or some crashes that happens that were not caught in during testing, we do the bug fixes accordingly. So, if it goes into play store and then if there needs to be some hot fix release needs to be made, we fix that on the master branch and then we bump up the version and release it. Similarly, on the stable branch, if the app is in alpha and there is some feedback from alpha users, we bump up the version of the stable branch itself and the rest of the team continues to develop on the develop branch. And this anything other than this naming convention is basically a 32 version artifact that is deployed which you can use for testing, you can say locally or if you are working on a feature branch, you can get the 32 artifact and then make the app using that and test it before even merging to that. Yeah, this was all of this was gradle magic. So, there was nothing like some magic happening that I did or someone did in project. It was all gradle magic. So, the 32, 42, 52, 62 I mentioned all of the corresponding versions are replaced here and then the transitive is set to true and yeah and the final app knows that okay, it fetches only the artifacts and it does not need to fetch the dependencies that are mentioned in that particular artifact. So, let's say if busway is dependent on base library, it won't fetch base library. Okay, processes also changed. So, previously someone, so this is a thought process like previously someone was managing CI for me to I manage my own CI. All the product reports they manage the own CI now. So, we have close to 70 member mobile team and there were a lot of people problems, communication problems and all. So, most of these were solved like coordinating with the QAT, giving them the build and all. After having the CI CD practice, like most of them were solved. It also simplified a lot of processes and software development like PR review, merges, testing and all this. Everyone releases the app. I got to point this thing out. So, it is not just me who knows everything how to have this whole CI CD setup and how I only know that okay, this is how you release it to the Play Store. So, we follow this practice every release cycle. We nominate one Android and one iOS Dev. So, they are responsible for coordinating the whole release process, following up with the testers of different product teams and like and then finally till the app is uploaded to Play Store and even after the app is uploaded to Play Store, if there are some patches or not, they will monitor them and then like respond to the fixes if there needs to be any. So, everyone knows everything. It is not just one person who is like having the knowledge of the whole release process of the app. Since the code was modular, the testing and the review process became a lot more easier. So, testing, unit testing, we have like both for Android and as we have unit testing, unit testing is like must to have. Then instrumentation testing is using Espresso. Then we also have something called as API testing. Since the UI testing, so we have UI tests that are running using Appian, which takes a lot of time to run. So, before even starting that, we just make sure that okay, all the APIs are working correctly or not. So, we do that using the API testing. And yeah, we are using few open source tools, one of them is like OpenSTF. So, to remotely manage the in-house test lab that we have. So, this is the test lab that we have. A set of 20 Mac Minis, which has the GitLab, CIE that are installed on them and physical devices connected to it and which runs the Appian test, the Espresso test on the day in and day out on every commit that we do. Also, we have a nightly running regression test. So, running a regression suit on every commit is a big difficult because now we have so much of tests to run. So, we run, we trigger like regression suit at 12 a.m. in the night every day. Release process. We follow two week releases mostly and sometimes maybe in two months, once in two months or three week releases. And the participating product team just have to push their port from developed to stable. And then after the testing is done, App AlphaFix released, the full cycle testing is done. Then they have to move the port from stable to master branch. Once the port is on the master branch, we release the App to Play Store. And that is also done in the phased and the percentage rollout that is provided by App Store and Play Store respectively. Architecture at Gochek. So, I mentioned about what is the CICD setup that we have at Gochek. So, this is the happy mobile developer who pushes the port to GitLab. GitLab is like GitLab master. Since GitLab is both, it hosts the source code as well as it is a master as well. So, once the code is here, it delegates the commit to this GitLab runner. So, we have two kinds of GitLab runners. One of them are the Docker containers. And another set is of the Mac OSX in house 20 Mac Minis farm that I have shown you in the previous slide. So, since for Android, you just need Android. It is independent of the OS. So, you can run it on the Docker containers. Whether you run it on cloud or locally, it does not matter. So, we run it on cloud on Docker containers having the Android installed on a base image. And for building the iOS app, for testing the iOS apps, you require Mac OSX to be on your machine. So, for that we have set up this Mac Mini. This Mac Mini also solves us the problem of testing Android. So, for doing the UI testing of Android apps, you need to have devices connected unless and until you are not using emulators. So, yeah, we have set up that also on this Mac Mini farmers. And this both kind of runners are connected to GitLab. So, these are the stages that we have. So, this is a GitLab CI.AML file. Very easy to write and manage and learn. This is for Android, like specific to Android. So, we have these stages, build stage, test stage, API smoke test, US smoke test, UI regression test, UI mix panel regression test. And then the dispute whether we distribute it via fabric to internal users, alpha users or directly uploaded to the store. So, it uses the Android CI Docker image to and runs the command Gradle clean build on the Docker container. And once the build is complete, it archives the artifact and upload them back to the master. So, artifacts are basically the APK files, the test reports or the manifest and the mapping files that are needed for pro guard crash litics, the obfuscation process. So, and there is this last thing that is called as tags. So, Android build is a tag for the Docker containers or the GitLab CI runner that is tagged with like the first set of runners that I showed in the previous slide that are that is Android build. And then this is how it looks on the pipeline view or on the dashboard of GitLab. Similarly for iOS, I use Fastlane to build the iOS app. So, because Fastlane simplifies everything, the provisioning profiles and certificates and keys and everything for the system. And at the end of the stage, we have IPA and DSYM files that are archived and uploaded to master. So, these runs on the runners that are on iOS or the Mac mini form. So, we have tagged them as iOS. Like everyone here will some will say, okay, no, multi repo works for us. So, there is nothing like kind of best practices or something. If mono repo works for you, go ahead with that. If multi repo works for you, go ahead with that. Like mentioned the pros and cons of the different approaches. So, if you have a mono repo, it's easier to navigate. There is no dependency management and all those artifacts reset up and all that. And the cons are if your code grows and yeah, the build times are high unless and until you are using some magical tool like bug or something. And PR review process is complicated if it is a bigger code. And rows of multi repo is modular code. At least this was the advantage for us. When we have split the code into the multi repo structure, the modular code brought in the ownership. Each product team owned its repo. They worked on improving the code quality, writing more tests, making it more cleaner and all. Experimenting with different architectures and all. Even like some of the teams are now even using botlin in some places. So, building that specific module is resulting in faster build time instead of building the whole app every time even on the pieces of code that you have not got done. Cons are integration testing and FCT becomes full cycle testing becomes important because ultimately the final app is the one that is going to restore. It is not your just your own module. So, the testing becomes important and artifacts management is the overhead. What is future for project? So, yeah definitely. So, the current process is working for us. Maybe we are still experimenting with what can we do to make it more faster. So, one of the ways is like we can switch to another build tool by Facebook that is what is bug. Uber uses it, Facebook uses it. They have build times in milliseconds or seconds you can say. But yeah we are heavily relying on automatic code generation using dagger and all data mining and all data mining and all. So, but yeah we have this option in Gradle 4.1. So, Gradle 4.1 is released which also has the concept that is similar to bug. So, this if there is a change in a module then you do not build the whole app completely. So, we are still experimenting and making it more modular. So, the next step is to create more and more modules not just the 20 repos we will try to create like 50, 100 or 200 modules and then try to see if the performance improves with Gradle 4.1. And yeah, summaries and key takeaways. So, the ultimate goal this was covered in the whole day today in Pratul stock, Arun stock and so on. So, ultimate goal is to have happier teams improve developer productivity and there should be no people problems or it should be like at least you should reduce the existing people problems that you have and the communication lies. The third one is the most important one don't just blindly copy paste the strategy whether it is the CSED practice or you are doing anything from ok Google is doing it, Facebook is doing it, Bojake is doing it. Oh, let's do it. It will work for us. No. Try to come up with a strategy inspired from those companies and build up your own experiment with it if it works then it is good then or try to evolve it try to tweak it change it. So, ultimately it has to work for your organization, your scale try to make a manual interaction as minimal as possible that is like go to full automation. You can just for example, you can just have let's say building the app to play store and app store as a manual button that you can press this level of automation you can aim for if not like uploading every time to place for automatic and yes aim for smooth, better and high quality delivery and faster time to market. Ultimately we are building it for users we are building it for customers so you should have faster time to market and for that you need to have a CSED practice in place and evolving tools and processes and everything that I have covered. I also have a workshop on 17th of September. I will be covering mostly the Fastlane and the GitLab setup. It is a hands on workshop. You will be building a full Android, iOS and React Native pipeline if you want to join that and whatever I have covered in this talk will be doing hands on of that. Yes, I have 2 minutes and 17 seconds. If you have any questions go ahead. You are built on a master. Yes. If some errors happen, some bugs are happening then how do you immediately push a new update? So first we halt out the release. So in place store you have seen that option of halt the release. So first we release it to 2% users then 5% then 10% something like that. If we have a crash that is increasing in 2% of users we halt, we fix it, push 28.1.0 and then again continue with the release. What is it? The build time reduced to less than 2 minutes or less. Yes. You are referring to the build time of the complete app right? I am referring to the build time of that particular product repo. So what a product repo is? So let's say we are working on GoFood. So that repository will have a GoFood source code with a launcher activity which will have a trigger to the GoFood. So if you have seen the Gojek app, we have tiles right? Once you tap on the tile, you go into that product and the rest of the flow is related to that product only. So we have a small dummy kind of app which will just open the GoFood flows. With rest everything is in place, the org, the other dependencies are in place but it will just open the GoFood and GoFood related flows. So that product repo, build time or that small app only with that GoFood team is now building in less than a minute. That is like, fine for now. At least having a 1 minute build time is better than 20 minutes and wait for the rest of the score to build in. Android takes 5.6 after moving to Greater GoFood. Yes. Standard of the product? Yes. I have a product which is used by people. Yes. So what are the products used? Yeah, so I mentioned this, you are right. So we have this, let's say GoPay. GoPay is, GoRide also uses GoPay, GoFood also uses GoPay. You can use payments to do any other thing. So definitely this GoPay is used for other reports. So if you want to use, let's say you want to work on 4 reports. So if you are doing some change that requires you to work on 4 product reports, so definitely we fail the challenge how to work on multi-reports structure. So we mitigated that using Gradle. So we had this in settings.gradle, we have this, okay, you want to use more than one module, just mention that and you can work on 4 products. It's just a simple, just mention all those in settings.gradle. Let's say we have a similar project with multiple modules. This module should be released as a public module on Jcentre. Okay. And this module is dependent on sub-modules, sequential dependencies. So unless I release first module, I cannot release second module. And first module's version should be mentioned in the second module. Yes, definitely. Do you think it's completely in one single repository? Yes. Every time first I release one module, I have to update some version in the code and then I have to reduce the other one. Yeah. So how this release process can be managed? So I have to do some code change and then I have to reduce the next module. Okay. So how it works for us? I mentioned this, like this is how we solved it, the 32, 42, 52 and 62 I mentioned, right? Yeah. So the artifact with, so you can use 32, so you made a change, right? Use 32 version of that artifact. And for rest of the other dependencies just used 42. So this is how we solved it. This was the most easiest way that we could do. If you have a new code, if you have some other network, what other network is it? Yeah. So currently the core module that we have is the base. So everyone depends on the base. So if you don't want to, so let's say if send team wants to have their own set of implementation, you can go ahead with it. So all of these, we have given flexibility to all the product that they can use their own server URLs specific to their backends and have their custom caching, custom implementation. If they feel that, okay, this is something that is good, can be reused by other teams that project, then we ultimately merge that to the base. So this is how we experiment. So like Akhila is working on caching in Gopi team. So he'll build that, try that in the Gopi team. And if that works, we'll move that to the base so that everyone can use it. You mentioned have smaller commits. Yeah, smaller commits, yes. How do you enforce or motivate your developers towards that direction? So it's a guideline, it's a practice. One way that I can think of is make a githook as Pratul mentioned in the talk in the morning. You can make a githook that okay, the commit should not have more than this number of files or something. This is how you can automate it. Otherwise, this is just a practice that we have asked everyone to follow. So let's say, how we do current is, we are doing it in the manual way.  The first thing I'll check, okay, how big is the PR is? If it is too big, I'll say please break it into small PRs so that it is easier for me to review. And if there is any bug or some breaking changes, then I can narrow down, okay. This is the small piece of course that is causing the change. So currently we are doing it in the manual way, but yeah, we can use githooks for that. It's like the app developers that you have. Are your backends as well broken, the exact same product? Yes, we have more than 200 microservices running at one point of time. It's all of your product that was just talked to their own most of the time. Yes. The case like the base is where you get to share. Yeah, base is where you get to share. The common network part, the shared platform part. And if there is something that you want to reuse from other modules, just move it to...  Have you orchestrated all those 200 services rather? In the backend? No. Currently we are migrating to, so we are in process of migrating everything to Docker, but we haven't yet started that for production. So only one of the posts microservice is on Docker, completely on Docker. So we are still in process of migrating.


Welcome everyone to Bogle Heads On Investing, episode number 54. Today my special guest is Christine Benz, Morningstar's Director of Personal Finance. We'll be discussing taxes, expected long-term market returns, and safe withdrawal rates during retirement. Hi everyone, my name is Rick Ferri and I'm the host of Bogle Heads On Investing. This episode, as with all episodes, is brought to you by the John C. Bogle Center for Financial Literacy. A non-profit organization that is building a world of well-informed, capable, and empowered investors. Visit the Bogle Center at bogelcenter.net where you will find a treasured rover of information including transcripts of these podcasts. Today our special guest needs no introduction to the Bogle Heads. Christine Benz is Morningstar's Director of Personal Finance and a longtime follower of Jack Bogle's principles. Christine was the Chairman for the 2022 Bogle Heads Conference and now is the President of the John C. Bogle Center for Financial Literacy. So with no further ado, let me welcome back to Bogle Heads On Investing, Christine Benz. Welcome Christine. Hi Rick, it's wonderful to be here. You are the Director of Personal Finance and Retirement Planning for Morningstar and also the co-host of the Longview podcast with Jeff Patek. A lot of great information. But most recently you were elected as the new President of the John C. Bogle Center for Financial Literacy. And I was wondering if you could take a few minutes to talk about the Bogle Center and what your goals are. Sure. Thanks Rick. And I have to say you set a great example for me stepping into the President's role presiding over our board for several years before I took over. I'm really excited about what is on the docket for the John C. Bogle Center for Financial Literacy and also what we've achieved so far. I would say our marquee event last year was putting on our first live conference in several years. We had COVID to deal with which I made our plans in 2020 and 2021, but we were able to pull off a live conference last year and we had, I don't know, Rick, what was it? Like 370 people in attendance, almost 400 people. 400 with all of our speakers. We had 28 speakers. Yes. And so it's just thrilling to see a live event that is just all about education. So no booths, nobody selling anything. It's all about just improving investor education. And I think that really symbolizes what the John C. Bogle Center stands for. That we are providing education without an agenda through a variety of platforms. This podcast is one, the work that John Luskin is doing with the Bogle Heads live events that he's doing on Twitter Spaces and that in turn he's turning into podcasts is another. We're making contributions to Bogle Heads.org, which is that great platform that began at all and just trying to make an impact throughout our communities. And so we'll continue some of the efforts that have been done so well. I should mention we refurbished the Bogle Center website. And I think it's just a tremendous resource for educational videos and podcasts. And we'll be continuing to add to that in the years ahead. One kind of passion project of mine is trying to think about how we can take our army of intelligent, knowledgeable Bogle Heads and deploy them in their communities to help people in their families and their friend network who might be a little financially less savvy than they are. So we've been talking and trying to think about some ideas along those lines. I'm very excited about about some of the things that we have planned. One of the things that the Bogle Center has planned is another conference this year. And can you tell us a little bit about that? Right. I'm bursting with excitement as we think about planning this. And I know Rick, you and I are always kind of texting and emailing about potential guests, but I'm very excited about some of the guests that we have lined up so far. And we're we're firming up an agenda. We are planning this conference in the Washington, DC area. So we're going back to our original early days of the conference where it moved around and we're letting local chapters, local Bogle Heads chapters, take the lead on planning these events going forward. So this will be in the DC area in October, specific details and specific speakers to be announced soon, fairly soon, I would say in the first quarter. But I'm very excited about the lineup of people that we have planned for the conference. And we're trying to rely on Bogle Heads favorites. So Bill Bernstein will always be there as long as he wants to come because he is a member of our board and just a thought leader. I know you'll be there, Rick. And old standbys from the Bogle Heads, but we're also trying to bring in some new folks who are aligned with us, aligned with us philosophically, but have different approaches. So I'm excited to unveil the agenda and it should be later in the first quarter. And we'll be able to find that on BogleCenter.net, correct? Yes, exactly. Okay, very good. Well, thank you for that update. Today, I have you on to talk about a couple of things. The first thing I want to talk about is it's tax season. So we need to start preparing our taxes, thinking about maybe what we could have done better with our taxes, looking forward to 2023 and the new Secure Act and how does that affect our taxes? And then the second part, we'll talk about a report that you have been very involved in. In fact, you were one of the key writers of the report. And that is the state of retirement income and how bond yields and lower equity valuations have affected withdrawal rates. So we'll get into that in the second part. So we have a lot to talk about today. So let's begin with taxes. So here we are, we're getting those 10.99s in the mail. We're starting to accumulate all our information about taxes. What is it about 2022, which may have been a little different than 2021? Well, I was thinking, Rick, it's a great litmus test. As you look on your 10.99 for 2022, I've obviously not a great year for the markets. We had stocks and bonds declining simultaneously. So most of us had losses in our portfolios to the extent that people have taxable holdings, so non-retirement account holdings. It's a great time to look at the capital gains that you're paying on those accounts. So ideally, you would have your personal situation with respect to your gains and losses in line with your capital gains. But in reality, we know that many investors have a misalignment. They have asset location issues where maybe they have tax inefficient funds stashed in their taxable accounts. If you're getting funds that are kicking off sizable capital gains distributions in a year like 2022 when you didn't make any money in your account, that's a good signal that you have some work to do to improve your asset location. So you know better than anyone, Rick, that exchange traded funds, a broad market exchange traded funds are a great mousetrap for investors, equity holdings in their taxable accounts. Traditional index funds I think are decent as well, although maybe not quite as good as ETFs. And to the extent that investors have fixed income holdings in their taxable accounts and they're in higher tax brackets, municipal bonds might make sense in lieu of taxable bonds or will make sense in lieu of taxable bonds. So check that. If you see big capital gains distributions, that's a flag that you have some work to do. Countervailing consideration though is that in order to make that account be more tax efficient, you have to look at whether you have gains in that position and whether it's a good time to sell and potentially preemptively realize those gains. So it's something, if you're not super comfortable with tax matters, check in with an accountant. But I do think that 2022 is a good litmus test on the tax efficiency of your taxable holdings. So what I'm seeing in clients accounts is most fixed income in a taxable account, if it was purchased a couple of years ago or three years ago does have a capital loss in it. So if you are in a high tax bracket and you have taxable bonds in your taxable account and there are losses, take the opportunity to take the loss and then convert it to a municipal bond fund that that's a good trade. Absolutely and use that loss to your advantage. Use the loss to offset any other gains that you might have had in your portfolio. You can carry the loss forward into future years if you don't need it in 2022. So that's a terrific strategy, Rick. And not to put too fine a point on it. Another thing that I think investors should pay attention to as they look at those taxable brokerage accounts is what method of cost basis election they've selected. So if you have mutual funds, you're typically automatically defaulted into an averaging method. I really like the specific share identification method that does allow you to be surgical in terms of pruning those losses or pruning gains as circumstances dictate. So check that, a key thing to know though is that if you've previously sold securities using the averaging method, if you've sold out of funds and you've used the average method, you have to stick with it going forward. Now there's a couple more, just small changes that took place in 2022. And one of them had to do with the CARES Act not being extended. And this affected people who are doing standard deduction but were taking that $300 charitable contribution or they took it last year. So that was a CARES Act provision and it allowed people who were taking the standard deduction to get at least a small deduction for charitable contributions that they might have made. That's not available for the 2022 tax year. And so unfortunately, many taxpayers are not getting tax credit for their charitable contributions under the way that the rules are set up currently. They're not itemizing their deductions, they're taking the standard deduction instead. And so I would point them to a couple of things to think about with respect to charitable giving and making sure that they get a tax credit for it. One would be if you're over 70 and a half taking a look at what's called the Qualified Charitable Distribution, which is a contribution that you can make directly from your IRA account where you're steering an amount in 2022, an amount up to $100,000 to the charity or charities of your choice. And the nice thing about the QCD is it reduces your IRA account. And in turn, when required minimum distribution start applying to you, it can reduce the amount of your IRA balance that's subject to RMDs. So people should check out that if they are over age 70 and a half. If people aren't yet at that age, another strategy to consider that tax advisors get very excited about is the idea of trying to bunch your deductions together into a single year. So specifically earmarking charitable contributions for a given year where taken all together those contributions will get you over the standard deduction amount in a given year. And a donor-advised fund can come in handy here. I know a lot of Bogleheads are very enthusiastic about their donor-advised funds and Vanguard has a good one. You can contribute to the donor-advised fund, maybe use maybe appreciated shares in some cases. So remove the tax obligation associated with that security by contributing the shares directly to the donor-advised fund.  So an example, somebody who's giving $5,000 a year to charity might lump five years together and make it $25,000 and put it into a donor-advised fund and use maybe appreciated security so they don't have to pay the capital gain when they do it. So the $25,000 goes into the donor-advised fund with the state and local taxes and maybe some other deductions. It gets them over the standard deductions. They're able to at least deduct some of that contribution to the donor-advised fund. But then once it's in the donor-advised fund then they can send it out to charity $5,000 a year over a five-year period of time so the charity doesn't see any difference. It's just taking it as a tax deduction all upfront. Exactly, and that's why this is such a beautiful strategy. It can be especially attractive for people who have a large share of their portfolio in employer stock where that stock is detracting from the portfolio's diversification. Oftentimes that stock has a big tax bill attached to it. Those are ideal securities to send to the donor-advised fund. You can sometimes contribute illiquid types of securities to the donor-advised fund. There may be a surcharge and I think it depends on the provider to deal with the less liquid securities but that's a terrific option where maybe you're just a bogal head, you want to have a bogal head portfolio but you have for whatever reason large stock positions in your portfolio. It's a great way to deal with them. So let's move on to this year as we move into the tax year 2023 and we have something new out there called the Secure Act. Secure 2.0 and a lot of the Secure Act had to do with corporations and employers and bringing more people into the 401k umbrella but there was also some things in there that other people can use. Talk about some of those in more general. Sure, it is a grab bag of different provisions related to retirement planning but a couple jump out at me, Rick. One is a change in the required minimum distribution age. So it had been 72, starting in 2023, it's moving out to 73. That is an important change to note for older adults who are getting close to de-cumulating from their retirement portfolios. It's moving to 73 starting this year and then moving all the way out to 75 starting in 2033. So to me, this presents a really interesting opportunity for people who are on the brink of retirement who aren't yet subject to required minimum distributions. There's a lot of interesting tax planning that can happen in those early retirement years and I really credit Maria Bruno at Vanguard for evangelizing about what she calls kind of the retirement planning sweet spot. And so this is the post-retirement pre-RMD period and the reason it's so valuable from a tax planning standpoint is that these are often the lowest tax years in someone's lives because they no longer have income from their jobs. So it's a great time to consider strategies like converting traditional IRA balances to Roth in these post-retirement pre-RMD years. The advantages is that you might be able to take advantage of a fairly low tax rate in those years. You might also consider even preemptively taking IRA distributions with an eye toward reducing your RMD subject balances. And then there are other non IRA strategies to consider, for example, the 0% capital gains bracket applies to people with incomes below a certain threshold. So you might be able to consider strategies like that. One sort of real world countervailing force in my mind though, Rick, is that in my experience, these are often the high spending years in people's retirement where they're feeling good, they have busy travel plans. They're healthy. They're healthy. And they should take advantage of those years to fulfill whatever dreams they had for their retirement. So that may put a lid on how much they can keep their taxable income down. But another side note I would make on this point is that to take advantage of these years, you really do need to think about stashing money in taxable non-retirement accounts early on in your career ideally so you can have that tax diversification. You can have those taxable assets that you can pull from to provide your living expenses in those early retirement years. I would make one comment on this and that is that if you happen to retire before you go on Medicare and you don't have health insurance, that you may be going to the healthcare exchange and using the Affordable Care Act. And if that's what you're doing and you're qualifying for Affordable Care Act tax credits, then you would not want to take distributions from your IRA or do Roth conversions because it might put you out of the envelope for getting ACA tax credits. That's such a great point for pre-Medicare retirees. Certainly an important consideration. I do want to make one more note and that has to do with Medicare. A lot of people don't retire until 65.  The determination of how much you pay for Medicare is based on your modified adjusted gross income which includes all income, even municipal bond income. But they go back two years. So they go back to the year when you were working even though you're no longer working now at age 65 and your income is very low. So I would remind people that you can file a form. The form is SSA 44 and petition the Social Security Office to lower the amount of your Medicare premium rather than waiting a couple of years till it all catches up with you. So a lot of people aren't familiar with this form. Fill it out. It's a very simple form. Send it in and then you, or you could just call the Social Security Administration and you could just tell them on the phone and they'll fix it. And then you don't have these high Medicare, Irma premiums that you have to pay for Medicare because they're gonna use what today's income is rather than what two years ago was. So it's a useful tool for people.  But why even pay it high Medicare premiums when you don't have to? Sounds like a great strategy. There's a couple of other unique things about the Secure Act, which I thought were kind of cool. And one of them was if you're putting money into a Roth 401k, you had to start required minimum distributions at some point, unlike a traditional Roth, a Roth 401k you actually had to do required minimum distributions, but that changed. That's right. And the idea there was to bring the Roth 401k in alignment with the Roth IRA. Prior to this change, an easy workaround was simply to roll over Roth 401k assets to a Roth IRA. But this will allow people who for whatever reason want to maintain assets and their employer provided plan to do so if they want to keep the assets in the Roth 401k. So it's just a nice provision that brings the Roth 401k in alignment with the Roth IRA. And we are seeing more Roth 401k's coming online. I was looking at the data recently where I think roughly half of employers now offer the Roth option. And it's certainly something worth looking at for people who want to build out tax diversification where maybe they've been contributing to the traditional 401k for most of their careers and haven't yet amassed much in assets in Roth accounts. It's an opportunity for them to do so. And it's in many cases, pretty easy for employers to add the Roth account. So if your employer for whatever reason doesn't offer that, just ask. Ask whoever is overseeing the plan, whether it's an option and they may be able to add that on. Yeah, it's just an amendment. I use Vanguard for my own solo 401k and I just called them on the phone and they said, oh, you want a Roth option? Okay, we'll add it and it took like five seconds. Right. But speaking of a Roth, another interesting thing about the Secure Act, which I find exciting as a self-employed individual, is that the employer side could usually traditionally just go into the pre-tax traditional 401k but soon, the employer will be able to put money into your Roth 401k. Now, if they do that, you're gonna have to pay taxes on the money that goes into the 401k. But it's a great option, especially for people like me who are self-employed and I get what's called the Qualified Business Income deduction, which is I only pay taxes on 80% of my income. But if as an employer, I put money into a pre-tax 401k, I don't get the 20% off of my income because when it comes out of the 401k, I have to pay full tax on it. So I would rather not put money as an employer into my 401k, but now I can put the employer side the entire amount into the Roth account and pay taxes on it anyway, which is what I'm currently doing. So this is an interesting spin. It is, and I just think more flexibility is better. It may not be the right avenue for people to take their matching contributions in a Roth account, but for some of us, and for you, it sounds like Rick, it's the right way to go. So I think that this provision and that it opens things up and gives that flexibility to have those matching contributions go to the Roth account. I think it's all for the better for employees. And there is one more thing. It seems like the insurance industry is finally getting their clause into the 401k marketplace. There is now going to be the option for employers to add an annuity to make it look more like a defined benefit plan of some sort. So talk a little bit about the annuity investment options that we're gonna start seeing in 401k plans. Well, so this was part of the first Secure Act, Secure 1.0, but frankly, we haven't seen much of an uptake of annuities within 401k plans even though this has been, it was an allowable option. Secure 1.0 gave employers safe harbor to offer annuities within the 401k context. The idea is that there's, frankly, in my opinion, a lot that's suboptimal about our current 401k setup where we're handing people their pool of money later in life when we know that cognitive decline affects some older adults. And we're basically saying, figure it out. And many people need help with this. And so I don't think it's entirely malevolent. I do think that potentially there is room for certain people to have a portion of their cash flows coming in through some sort of guaranteed income sources. An employer provided for a 1k plan might be in a position to better vet the options that an individual may be able to do on his or her own. So I don't think it's entirely a bad development and we haven't yet seen annuities receive much of an uptake in the 401k plan context yet. I think it will though. I know it takes a while for these to get into the system but I think you will see the guaranteed income option or whatever they start labeling these things within the 401k. But knowing that if you go that route just like a defined benefit plan there's nothing left for your heirs.  That's true. And that's why it's rarely a good idea for someone to annuitize their whole mistake. You'd wanna think of it as just a portion of the portfolio. One way I like to think about it is can you try to secure your cash flows for your non-discretionary expenses? So for your food, for your shelter, for your taxes can you secure those cash flows from some guaranteed income source whether it's social security, potentially an annuity but I like the idea of trying to align those two things so that if you have fixed outlays that you're on the hook for can you try to line up certain sources of guaranteed income to address those expenses? I just wanna hit on one more thing about the Secure Act which was interesting. It's residual balances that a lot of people end up with in their 529 plans that they set up for their children, the children of the beneficiary or maybe a niece or a nephew is a beneficiary and it grows tax deferred or tax free actually if the money is used for education but historically at the end if the money isn't used for education and the money has to come out of the 529 because there's nothing else to do with it then it's gonna be taxed and penalized. But now there's a provision and the provision is I think a really good one where you can convert some of that money at least to a Roth account. So talk about this option and the rules and regulations surrounding it. Right, this is the provision of Secure 2.0 that seems to get planners who I talked to the most excited and the basic idea is just as you said Rick that if people have residual balances in 529s where they've effectively overfunded the 529 those funds can be transferred to a Roth IRA for that same beneficiary. So there are a couple of key things to know about it. It's not just like the flood gates are open. There's a lifetime transfer limit of $35,000 and that 529 plan must have been maintained for 15 years. So if you have young ones in your life children, grandkids, I think that really argues for thinking about getting these accounts set up early getting the 529 set up early. But I do think it just adds a nice level of optionality to 529 planning where in the past you did have quite a bit of flexibility to transfer residual balances to different beneficiaries. But most people I think would like the flexibility to maintain the assets for the same beneficiary, the same child. It's also important to note that only the contributions and earnings attributable to contributions made more than five years ago are eligible. So it's not like you could super fund the 529 in the waning days of your child's high school career or something and necessarily be able to get the funds over to a Roth IRA later on. So you need to be careful about the date limits that apply to these potential transfers. But I think it's an exciting provision and does just give families more flexibility. And the other nice thing is that you are in many cases earning a state tax credit or deduction. It depends on your state with respect to your 529 contribution. So it's a way to get that state tax benefit but potentially use the funds later on to move them to a Roth IRA. For the beneficiary. Exactly. And I have to tell you when I first saw that I just saw the headline and I said, oh, wow, I'm gonna open up a 529 for myself. I'm going to super fund it with 35,000 and then I'm gonna move it over to a Roth. But it doesn't work that way. And when I got into the details of it, I couldn't do that. Right. And you couldn't even change the beneficiary to myself. Let's say if my child or my grandchild didn't use the money and I had money sitting in a 529 that I put in over the years, I couldn't change the beneficiary to myself and then move the money to my Roth account. So there is a lot of rules. There are. And also it's important to note that the beneficiary has to have earned income in the year that those contributions are made. And you're also subject to those IRA contribution limits. So in 2023, we're at 6,500. So just bear those rules in mind as well. There's a lot more to the Secure Act and having to do with contribution limits for various people, catch up provisions. And so it's worthwhile to just go on the internet and just type in key components of Secure 2.0 and a lot of articles come up. But let's turn our attention to the state of retirement income, which is a project that you've been working on at Morningstar with your colleague, Jeff Pratek and John Reckenthaler. Been doing this for a couple of years now and you just updated it a few months ago. So first of all, tell us about the project and then get into some of the changes. So one of the key things to think about with respect to retirement planning is how much you can safely take out of your portfolio over your lifetime without running out of funds. And it's one of the most complicated problems in financial planning. I don't know what you think, Rick. I think it's the most complicated problem in financial planning because we don't know how long we'll live. We don't know how the markets will perform over our time rise and we don't know what inflation will be like. So lots of wild cards. An awful lot of assumptions that go into this. Right. So one guideline that has been around for a long time is what's called the 4% guideline. It was originally developed by William Bangin, a financial planner. But the idea that he had was, what is the most that a retiree could have taken out in year one of retirement and then inflation adjust that dollar amount thereafter? Even if he or she hit Armageddon in terms of market performance, what was the most starting withdrawal percentage that he or she could have taken out? So I just wanna clarify what you said. We're looking at just year one. Right. In other words, using the 4% rule, if you had a million dollars, $40,000. So starting with year one, 40,000 if it's 4%. And then that number adjusted for inflation going forward. The number never changes, it's always 40,000. If that's correct, am I reading that correct? Absolutely. So if inflation is 3% the following year, you're taking 41,000 and change in that next year. So it's not 4% in perpetuity. There's a lot of confusion about this that people think, oh, you're saying I can safely take 4% year in and year out of whatever my balance is. The reason that Bangun didn't arrive at that strategy is that that leads to a lot of variability in people's cash flows. So some people, especially more affluent people might say, I'm fine with that, I'll just take that fixed percentage. But many people on smaller budgets would just be buffeting around too much if they were taking a fixed percentage of whatever their balance happened to be. So that was the formula, that was the framework that Bangun arrived at. He used historical market returns to determine that 4% was more or less safe. So let me interrupt for a second. What does the word safe mean when you're saying 4% was safe? What exactly does that mean? Yeah, it's a really good point. And so there are different interpretations of what's safe. What we used in our research was a 90% likelihood of not running out of funds over a 30-year time horizon. You can alter that as you see fit so you can assume a lower probability of success. So take it down to 85%, for example, or take it all the way up to 100%, which I would not recommend, but you could do that. So I believe in Bangun's original research, he was using like a 90% probability of not running out of funds over a 30-year time horizon. But you can tinker with that based on the probability that you're comfortable with. Okay, thanks. So we have our starting number, some percentage, and we can adjust that for inflation. And at least in the studies that you're doing, there's a 90% probability that if you just do that, you're not gonna run out of money during a 30-year period. And this could be either a single person or joint with spouse, that doesn't really change, correct? That's right. So one distinction with our research and the reason why we have been updating this research every year is that our thought is yes, historical returns and how the market has behaved historically is super important. But also what do we know about how starting yields and equity valuations might affect returns in the future? So that's what we attempt to do. We attempt to take a forward-looking view of how the stock and bond markets might perform. So William Bangan looked back over market history to come up with the 4% guideline, which he has since made some revisions to. Our idea is that yes, historical market returns are important, they should influence how people consider, how people think about what's safe in terms of their withdrawal rate. But we think it makes sense to incorporate starting yields, equity valuations, to create kind of a forward-looking view of how the market might perform over the next 30 years and use that to inform what's a safe withdrawal rate. So we turn to our colleagues in Morningstar Investment Management who do what are called capital markets assumptions. They do them over a variety of time periods, but we take their 30-year forecast and plug them into our models and then use Monte Carlo simulations to help look at what would have been a safe withdrawal rate for investors with different time horizons and with different asset allocations. Well, that begs the question of what expectations of return are you using for US equity, foreign stocks, yeah, fixed income, cash, and inflation in this report. Well, let me say, compare and contrast what you were using in 2021 with 2022. Well, it's a lot better in 2022 versus what we were assuming in 2021. So most of the equity market assumptions, and it varies a little bit by sub-asset class, they run the gamut from 9% all the way up to 12%, so 9% for US large value, 12% for US small value. In contrast, while the non-US component, the non-US assumptions were higher in 2021 or were as high in 2021 as they were in 2022, the US equity forecast was substantially lower. So the return assumption, this is a 30-year return assumption for most of the sub-asset classes in US equities ranged between 6% and 8%. So big bump up, one caveat I would make though, Rick, is that 930 2022 is the return assumption that we use so that it was dated as of September 30th, 2022. The market was kind of, I don't know if it was bottoming, but the market performance had been terrible through that period. It's picked up a little bit since. We've seen somewhat better returns from the stock market. So my guess is that the team has probably curtailed their return assumptions a little bit since they produced those September 30th, 2022 numbers. And then in terms of inflation, we used a 2.8% annualized inflation assumption for that 30-year horizon. So higher than what the Federal Reserve target is of 2%. Interesting, I went into other data, Morningstar data, and looked at 10-year returns and for US equities, developed markets, emerging markets, bonds, and over the next 10 years, even Morningstar was forecasting a little lower returns. You were forecasting, on average, in general, about 6% for US equity and developed markets. You were forecasting roughly 8% emerging markets a little higher. So these 30-year forecasts are considerably higher than even your 10-year forecasts. And I would note that it's a separate team. I don't work in Morningstar Investment Management, but I think what they're looking at in terms of the curtailed 10-year equity return assumption is just that US equities, even though they have had a tough year in 2022, still are not inexpensive by historic norms. So they're giving historical returns a little bit of a haircut to account for that. They're potentially factoring in some lower earnings growth in the US over the next decade. The foreign stock assumptions are much better. And I would say that when we look across different firms, there's some uniformity in that view, where non-US, because of lower starting valuations, the non-US equity markets are likely to have better returns over the next decade than the US market. These are just general numbers, but I took your 10-year forecasts and I said, okay, let's come up with one general global equity expectation of return. And let's say US is 6% over the next 10 years. And these are annualized. This is not arithmetic, which is different than annualized. Arithmetic is just taking the average and dividing it by say 10. Every year and dividing by 10. Compounding lowers the return due to volatility. So my first thought when I looked at your 2022 numbers for the 30-year forecast, because they were quite high in my view, was that you're just using an arithmetic return, but in fact, it actually was annualized. But anyway, I don't wanna get into the math behind it, but just getting one generic global equity expectation using all the data that you showed for 10 years with the US being 6% and international, which would include both develop markets and emerging markets, combined 75% develop 25% emerging, comes out to roughly 8.5. So if you were to have a portfolio that was roughly 2 thirds in the US market and 1 third in the international market, you'd be around 7%. 7% equity expected return, at least over the next 10 years. That's what I came up with, try to make it simple. And on the bond side, 4%. That's very, very close to what I use with my own clients. Think of 7% equity and 4% of fixed income and then some element for cash, maybe 3%. And that's what I've been using. So I found it interesting that that's what the 10-year numbers are. But when I looked at the data that you used for the 30-year numbers, it was a lot higher than that. So anyway, just throw that out there as a caveat, meaning if you wanna be super safe with the numbers that we're about to talk about, which is the withdrawal rate, that there is some discussion out there about the 30-year numbers that you used. So your withdrawal rate, safe withdrawal rate for the 90th percentile in 2022 was 3.2%. However, because the assumption for 30-year returns on stocks, bonds, and cash are higher now that the markets have come back down, what is it now? So I should note that finding was that if someone had a 60% equity, 40% bond portfolio, that 3.8% starting withdrawal would be safe for someone with that type of asset allocation mix. We did find that maybe somewhat surprisingly tier listeners that really dialing up equity exposure didn't help that much. And that's in part because of the volatility and the variability of equity returns, that it's just too risky for someone to have a mostly equity portfolio in retirement. And the other factor in the mix is just that bond yields have gotten so much better that retirees would be foolish to not take advantage of that very safe return potential that's currently available was not previously available, but is currently available from fixed income. So we look at all different time periods. This is the 30-year time period. What you can see is that if you have a shorter time horizon, so say a 15-year time horizon, maybe you're a retiree who's been retired for 15 years or so and that you think your life expectancy is roughly 15 years, you can see that with a 60-40 portfolio, you can take closer to 7%. So it's a good check, I think, on whatever withdrawal you're taking currently. It's a way to check on whether that is a reasonable withdrawal. The equity side of your number had large cap growth and large cap value, basically 30% large cap growth, 30% large cap value. 20% in foreign stocks, a 10% in small cap growth and 10% in small cap value. So my question is in the creation of this equity side, 20% seems a little bit light in foreign securities in most asset allocation models.  I can answer it generally, which is that when you do look at most professionally managed asset allocations, I think they're more in the neighborhood of 25, 30%. But one thing I think about with respect to non-US allocations and retiree portfolios is that there is a wild card of foreign currency fluctuations that comes along with non-US stock exposure, non-US bond exposure too. And the fact is as someone gets closer to spending from the portfolio and begins to actively draw up on the portfolio, that does at least theoretically argue for perhaps reducing the non-US exposure a little bit because the idea is that the spending will be done in US dollars. And I know that it went in the past when I've looked at my colleagues in Morningstar Investment Management's allocations, I've noted that they have in fact stepped off the gas a little bit in terms of foreign stock exposure for older adults with that very thought in mind. And the same goes for other factor tilts that they might employ. So for example, I believe they have a little heavier weighting in small value, US small value for younger investors. They pull back from that a little bit and go more sort of US market style neutral as someone approaches retirement, in part because at that life stage you just have less time to potentially benefit from factor tilts like that. So in summary on these numbers, these third of your numbers, at least some would argue they are a little bit high, at least they feel they're a little bit high, but they're also overwading US to international versus what a global allocation would be and international would be expected to do better than US. So if you went more to a more market neutral allocation between international and US, the number would go up even though maybe the overall expected returns of these asset classes will go down. And my point is that in the end, this is just an estimate obviously, we're dealing with all kinds of assumptions here. And what you came up with in the model, the 90th percentile was 3.8%, which means if you add a million dollars, your starting number would be $38,000. Do I have that correct? Exactly. And so a real world point that should be made in this context is just that we're talking about end of 2022 balances. Most investors had a decline in their portfolios in 2022. So 3.8% of a smaller portfolio balance may in fact translate into a smaller take home withdrawal, starting withdrawal for someone who retired at the end of 2022 versus what it would have been in the case with that lower percentage on a larger balance at the end of 2021. So I often think that as much as we like to think and talk about withdrawal rates, what really matters to people is their withdrawal amount. And then that effect of declining markets last year is that even though a higher percentage would be supported, it may translate into a lower take home paycheck. Well, let's talk about some other things too, which you've talked about in various discussions.  So how does all that factor into these numbers? Well, that's such an important dimension, Rick. In fact, I sometimes think like this baseline withdrawal rate discussion is, if I'm being candid a little bit of a straw man in that when we look at the data on how people actually spend, they don't spend in a flat line. They don't spend this fixed real withdrawal amount year in and year out. And so I often reference some research that was done by my former colleague, David Blanchett, where he looked at how retiree households actually spend their money. And he identified exactly the pattern that you just referenced, where it's kind of a smile shaped spending pattern where the spending is high early on. It trails off in the middle to later years of retirement. And if you think about older adults who you may have known in your life, this probably syncs up with your own experience with them. They spend less in the middle to later years of retirement. They're maybe not traveling as much. Maybe they had two homes and they moved down to the single one in the warm climate. And then spending sometimes trails up later in life. And that's often to cover uninsured healthcare outlays, especially long-term care outlays. So in consultation with David in this year's run of the data, we decided to try to incorporate that spending smile idea. And David identified that retirees on average spend about a percentage point less than the actual inflation rate over their total time horizons because spending declines in the middle to later years of retirement. So for the purposes of this study, we haircut our baseline inflation assumption of 2.8% to 1.8% to reflect that finding that David identified as you might imagine, that delivers a lift to spending early on in retirement. So for people who want to be able to spend a little bit more early on in retirement, it gives them a lift in their initial withdrawal. But in exchange, that means that they have to take less than the inflation rate on an ongoing basis. So it's a bargain that might be attractive to some retirees. It was something that we wanted to explore in the research. And we found that with that assumption, assuming a lower inflation adjustment on an ongoing basis that retirees could take comfortably over 4%, assuming those same baseline assumptions of a 60-40 portfolio, a 30 year time horizon and 90% probability of success. I'll have to say that the data and the analysis on retirement spending is just getting better and better and better. Reports like yours, it's information, it's a data point. I mean, it's not the end all, it's just useful information that you can incorporate. There are also now some great software out there, some of it free, some of it you could buy like newretirement.com where you could model this out in a similar fashion and it incorporates taxes and Roth conversion. So fortunately, it's just getting better and better and better for everyone. And so what do you, with this particular study, where do you see it going and what's the next thing? You incorporated spending patterns as people age. I mean, what's the next iteration of this? I continue to be really intrigued by the variable strategies. And you mentioned, Rick, that software is available to help people navigate this, but it seems like if you try to reflect on what are the commonalities of what leads to success or failure and retirement, being flexible with your withdrawals is super important. So if you can pay attention to what's going on in your portfolio balance, indirectly pay attention to what's going on in the market, that can help improve your withdrawal success. So one set of research within this research paper looks at these various, what are called dynamic strategies. One I particularly like is called the guardrail strategy that was developed by financial planner, Jonathan Guyton in conjunction with William Klinger, who's a computer scientist. And guardrails looks really good from the standpoint of our research in that it gives someone a higher starting withdrawal and it also gives them a higher lifetime withdrawal. And so I think guardrails is especially important for retirees who are a little less concerned with having funds left over at the end of their lives and most concerned with enjoying the fruits of their labors. So making sure that they spend in line with their goals that guardrail strategy allows them to spend a little bit more. So for people who wanna take a look at our paper, we do dive into several of the dynamic strategies. What I think what's surprising is that even fairly modest tweaks to a fixed with real withdrawal system can give a lift to starting withdrawals as well as lifetime withdrawals. So I expect to see more research from us there. One thing we would like to do in the future is to incorporate annuities to think about how having an annuity might affect someone's withdrawal system. So I would expect to see more from us in that area. Christine, it's been wonderful having you on Bokel Heads on Investing. Again, thank you so much for all the work you do to help all of us out here trying to figure it all out. And we're looking forward to the Bokel Heads conference in October in Washington, DC. Thank you so much, Rick. I've really enjoyed it. And I am looking forward to that conference too. This concludes this episode of Bokel Heads on Investing. Join us each month as we interview a new guest on a new topic. In the meantime, visit bogelcenter.net, bogelheads.org, the Bokel Heads Wiki, Bokel Heads Twitter. Listen live each week to Bokel Heads Live on Twitter Spaces, the Bokel Heads YouTube channel, Bokel Heads Facebook, Bokel Heads Reddit. Join one of your local Bokel Heads chapters and get others to join. Thanks for listening.


What's going on everyone got a brand new movie review for you guys today and today I'm discussing the Netflix new original film Directed by the Coen brothers and that is the ballad of Buster Scruggs Out of Buster Scruggs is an anthology film following a bunch of different storylines with a bunch of different actors showing up within these And it's all taking place on the wow wow West going through Prospecting going through the Oregon Trail going through a scary stagecoach and even going maybe to the outlaws and the in-laws You never know where the ballad of Buster Scruggs is gonna take you next I was really excited for this movie one being I'm a huge fan of the Coen brothers the Coen brothers is like more My favorite directors like working today no country for all men raising Arizona and the Big Lebowski are some of my favorite films They've ever produced you can never forget about true grit Fargo Miller's crossing they have a huge lineup of films that you can never forget to knowing There's a new Coen brothers film coming out It's gotta get film fanatics a little bit excited Especially when it's taking going back to the wow wow West just like how they did so well with true grit And I got to say I'm a little disappointed with the ballad Buster Scruggs. It's not horrible by any means it's very well made It looked beautiful. I mean this film is some of the most beautiful looking films I've ever seen I if I'm not wrong This actually might be the first film that they filmed digitally And I think that actually enhances a lot of the scenes because there's this one segment that they go through Which is like about a prospector in this weird valley where he's just mining for gold and it is Stunning how well that film looks and the whole film could win best cinematography. It is Outstanding what the cinematographers got out of here every single shot is miraculously amazing even the score is beautiful You hear it's that wow. I'll ask or you're gonna get but my issue with this film is with the storytelling The scripts are great for each and every segment Scripts are great for each and every segment and even though some segments do run a little bit too long and even a tad bit short at times And maybe not all of them were perfectly great the thing about anthology movies is when you do an anthology movie I always expect for some way to tie it in the end or at least tie in subtle nods and stuff And I do understand what the Coen brothers were going for it They were going for showing different aspects of the wow wow West they're showing the outlaws They're showing the prospecting they're showing the mind gold digging and they're showing the organ trailer showing all these different Types of phenomenons within the wow wow West that we all come accustomed to when reading about when playing video games about When watching movies about we see these different things and the Coen brothers are tackling each and every aspect of it But I was expecting for the tie-in or I was expecting for it to be entertaining it But the film came off in two different ways for me one It's like the Coen brothers wrote a bunch of different scripts and they were like wow. We have all these ideas I don't know what to do. Let's just make him short stories and make short films out of them. Yay Let's do it and Yeah, that's what it felt like mostly but I do think this movie would have benefited being a TV show Over just being a feature film one of the big reasons I say this is because the film drags it gets long and not in that Oh, yeah, I'm having so much fun because there are some good moments in here There are some enjoyable moments. I'm no I don't want to sound like I'm crushing down on this film But I was so disappointed by this way it just by the end of the film I felt exhausted it was like two hours and 13 minutes and I just felt exhausted I needed a break in between the segments because some segments run a little bit too long Some segments run a little bit too short and I wanted more from some of the other ones segments easily in here that you could have made Just a feature film about in general, but each segment just feels like its own self-contained story, which again, that's what it's supposed to be But I really think picture this Buster Scruggs come in This is the first segment he is and the way that he goes about and the when his story ends it goes into the next story And it has nothing to do with the Buster Scruggs, but I was picturing this film going What if the Korn brothers made their own anthology series kind of like the Twilight Zone series in a sense where each episode is a different story Just like how this movie did it and Buster Scruggs is the host talking about what's gonna happen in this episode I'm where it's going and what part of the Wild Wild West we're gonna be tackling this Episode varying different actors popping in James Franco Liam Neeson Clancy Brown popping into these certain segments and enjoying their different types The stories and going about them and seeing where it goes. That's what I was expecting That's what I kind of wanted. I think what have worked better really as a television show. I don't see why they made this into a movie I think it really would have worked better on the small screen. You're wrong I love seeing this on the big screen It is going to some theaters and it will be on Netflix all in the same day But that's it I do think the story could have benefited from that and from being an anthology TV series over a movie acting is great There's some great moments and you're personally my two favorite segments were the organ trail one I thought that was brilliant. I loved every single thing it got about it and I love how each story ended I think each story ended in a very different type of dynamic way But fit with him perfectly toned within the Wild Wild West and my other favorite one was the last Segment they went through is taking place in a stagecoach on a stagecoach of just people talking and it's so interesting It's funny. It's laughable and it just works for everything that's going in here There's six segments overall and I enjoyed most of them some of them I think dragged on a bit all the ballad of Buster Scruggs is an entertaining watch It's a mixed bag personally for me and I think if you're a Coen Brothers fan I still do recommend it you'd find try and find a theater near you that's playing it If you can't do check it out on Netflix if you got Netflix It's right there in front of you to watch on November 16th again. I liked it. I just wanted to love this film I'm a big Coen Brothers fan, and I just felt a little bit disappointed from this film I got what they were going for but I do feel like in the end of the day It would have worked better as the television show good performances great writing great looking movie and a great score The story and the segments all don't piece together and for me not all of them really work all together By the end of the day. I just again. It's a mixed bag for me So with all it's in I'm gonna get the ballad of Buster Scruggs a C No, I'm gonna be the minority on this one. So I'm curious here you guys thoughts down below So let's talk about it down below Do you guys feel the same way you think this would have worked better as the television show? Or do you think this would have was perfectly fit as a movie let's discuss it down below in the comments also Leave me a comment down below and tell me where it is your favorite Coen Brothers film And what was your favorite segment from this movie? Let's talk about it Thank you guys so much for watching this if you guys are new here It's a new here hit that like and subscribe button so you guys never miss a video plus also hit up sandwich on films down Below is right down there you guys can get into advanced movie screens and check out some movie news And even some movie reviews, but guys of course until next time stay classy and have a great rest of your day