|Doc Brown's Secret Stash
For the sake of the film, we don't need to wonder how Doc got that money - he's from a wealthy family and can easily afford to pay the prices money collectors pay. Plus, he's been preparing for it for 30 years.
But for the sake of argument - the only sake there is! - let's suppose that you are the inventor of a time machine and you have no large financial resources at your disposal and don't feel like waiting decades to accrue when you want to travel into the past. The problem you encounter if you try to get all the period-specific currency you need by purchasing it from a dealer of antique money is that you pay vast current sums to get even one dollar. I see that ebay has silver dollars from 1885 going for upwards of $350. Highly expensive and inefficient way to fund your time travel safari.
Since the value for each dollar bill gets higher the older it is, inflation doesn't work in your favor. That is, a street dollar has much more purchase power in 1955 than in 1985 - and even more in 1885. But fat good that does you - unless you want to take advantage of time travel to make money as a currency exchanger.
Strikes me that the method of getting the period specific currency you need would be tedious and methodical. You'd have to patiently spend time in the present day gathering enough paper money (let's ignore coins to start) that's still in circulation from a previous minting. Say, 1977 bills in 1985. The problem is that dollar bills generally wear out and are taken out of circulation by banks and destroyed after roughly 22 months. This is a case where inflation works in your favor, because the higher the denomination (over $20), the less wear it gets and the longer it stays in circulation. So you can grab just a few reasonably crisp $100's from the 1977 minting and then travel back to 1978 (say), walk into a bank and exchange them for $50s from a late 1960's-era minting.
Keep doing this in approximately six-year increments, always being careful to exchange denominations back and forth - simply because why would anyone walk into a bank and swap a newer $100 dollar bill for an older one? Eventually, you'll end up in the target era with the legal money you need - and a vastly increased purchasing power without having to spend a cent. In fact, you've made a serious profit. A quick check of the old currency calculator shows that the value of a dollar in 1885 was at least $11.50 compared to 1985 - or a percent increase of %1150.
Obviously, it gets more difficult to casually exchange the larger denominations the further back you go - banks get fewer and further apart, you can't just drive your time machine to Chicago and you can't walk into a five and dime with a $100 bill in 1885 to buy some flour and then lay down the equivalent of $1,150 and expect change. It's best to start caching $50's and $100's as you go, and occasionally grabbing a $20 or a $10. That way, when you get to your target era, your supply of legal currency is flexible enough to use on the fly.
So in this way, you can live like a king for only a few hundred dollars a century ago.
In theory, you should also be able to make money moving forward in time by selling collectors your period money back in the present day, but I'm not so sure that works as easily as we'd like. For starters, the money you have would be in suspiciously good condition if you just grabbed some 1885 money off the street of the Wild West era Hill Valley, hopped in the time machine and walked into Ray Marello's. You'd also have the issue of it not being traceable by ever having traded hands from one collector to another, so on both counts you'd likely be either thought of as an idiot for trying to sell what's so obviously a forgery - or worse, arrested for forgery.
I guess the way around this would be to research a banking institution that's going to be around for long enough to allow you to open a safety deposit box in 1885, make your deposit and then come back to 1985, collect your antique money and then sell. Two birds with one stone - properly aged with rock-solid bona-fides.
OR, you could cut to the chase and just invest your money and leave it to yourself. And there's always the proven Tannen Method of betting on sporting events, but the true Tannen Method actually requires living through the entire period back to the present day to accrue your fortune. Plus, it means you have to either spend a lot of time going to a bookie or, even worse, to the game itself - which, if you know the outcome, strikes me as even more tedious than the Super Bowl usually is.