Cumulative Sum over 12 months by Postgreql 10
Will this be enough for you?

SELECT
  b.file_date,
  SUM(a.amt) AS amt,
  SUM(SUM(a.amt)) OVER(ORDER BY b.file_date
                       ROWS UNBOUNDED PRECEDING) AS rollover
FROM sample_data AS a
INNER JOIN LATERAL (SELECT TO_DATE(a.year_month, 'yyyy/mm') AS file_date) AS b
  ON TRUE
WHERE
  a."type" &lt;&gt; 'DZ' AND
  b.file_date &gt;= DATE_TRUNC('MONTH', CURRENT_DATE) - INTERVAL '1 YEAR 6 MONTHS'
GROUP BY b.file_date;


Results:

+------------+------------+------------+
| file_date  |    amt     |  rollover  |
+------------+------------+------------+
| 2019-01-01 | 75008.00   | 75008.00   |
| 2019-02-01 | 5008.00    | 80016.00   |
| 2019-03-01 | 93745.00   | 173761.00  |
| 2019-04-01 | 3745.00    | 177506.00  |
| 2019-05-01 | 2434047.00 | 2611553.00 |
| 2019-06-01 | 422922.15  | 3034475.15 |
+------------+------------+------------+


Demo.