So i got into a disagreement with ChatGPT about whether you earn more interest overall if you contribute daily rather than monthly, if the overall contribution over 1 year is the same.

I made CGPT write some python code to prove it. His code is on the left. I still didnt believe him so I wrote my own, on the right.

Our results seem to disagree, so Im asking you guys, if your interest is calculated daily and paid monthly, is it better to contribute $143 per day for 365 days, or $4349.58 monthly for 12 months?

  • evujumenuk@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    edit-2
    1 year ago

    Without starting to calculate, or looking at the code, I’d say it’s obvious that an investment strategy where all of a month’s contributions are made on the first day of the month will be superior to one where you spread them out. Also, an investment strategy of making the month’s contributions on the last day will be inferior to spreading them.

    So it’d really depend on how you time your monthly investments. If you can invest as soon as you get your monthly income, that’s probably the most beneficial way to do it.

    edit — Taking a quick look at your code, that’s exactly what’s happening. In each period, ChatGPT invests first, then lets interest accrue, whereas you let interest accrue, then invest.

    • iWidji@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      1 year ago

      But I would add, don’t hold back money from your higher interest accruing accounts if you have it, if you’re trying to optimize the interest. Once you have the money, deposit it as soon as possible, so interest begins accruing on it, even if it’s not the beginning of the month yet.

      In other words, if you hold back money, it’ll never accrue interest. You’re not going to get exponential or compounding growth on money that wasn’t accruing interest. You only get that once it begins accruing interest.

      • evujumenuk@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        This is a good clarification. Indeed, ideally you’d want to put your money into that higher-interest vehicle as soon as possible, so basically, the same day you get paid.

        In the limit, if you were to receive income once a year, you’d put that into savings immediately, which is maybe on January 1st, or earlier or later, depending on when your actual payday really is.

        If you get a windfall, you’d also not want to let it linger on your current account for (next to) nothing, but put it to work as soon as is feasible.

      • Agent641@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        So investing my money into savings right after I get paid weekly is the best strat then, which is what im doing. If i got paid daily, then investing daily would be the best strat.

        I wasnt actually trying to minmax my savings interest, I guess I was just confused by the robots’ counterintuitive answer but it makes sense now.

  • blueskycorporation@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    No need to use a script, you can put the numbers directly into a financial calculator and use the TVM feature, or use the annuity formula directly (or annuity due if investing at the start of a period).

    If you invest at the end of the period, daily is better, as more money will compound longer (vs waiting until the end of the month) If you invest at the beginning of the period, monthly is better (invest every at the beginning of the month)

    Example with investing at end of period:

    • invest $143 every day at 3% APR: value after a year: $52,983.60
    • invest $4349.58 at the end of every month for 12 months, value after a year: $52,918.66

    This is assuming you compound every day, as in practice, day count conventions may be different, and ignoring things such as the opportunity cost of the time spent time logging in to your bank to make daily transfers