[PLUS] How to Transform Minute Data into Another Timeframe in Python

We often are asked how to transform minute OHLCV data into another time interval (ie. "Hi do you have 5min data for BTCUSDT?" or 15min etc?), and so we decided to write a premium article demonstrating how to do this in Python. Sometimes this technique is called "resampling" and may fit different end user cases. More specifically, it is a subtype of Resampling called "Downsampling", which decreases the frequency of samples (ie. 1min -> 15min) As always, every line of code is commented so that you know exactly what each line is supposed to do. We will use the Pandas library to accomplish this and write a new CSV file with our results. For the data set, we will use the one minute data available from FTX on this page and change the data into a 15minute interval.

This is a premium post. Create Plus+ Account to view the live, working codebase for this article.

Notice: Information contained herein is not and should not be construed as an offer, solicitation, or recommendation to buy or sell securities. The information has been obtained from sources we believe to be reliable; however no guarantee is made or implied with respect to its accuracy, timeliness, or completeness. Author does not own the any crypto currency discussed. The information and content are subject to change without notice. CryptoDataDownload and its affiliates do not provide investment, tax, legal or accounting advice.

This material has been prepared for informational purposes only and is the opinion of the author, and is not intended to provide, and should not be relied on for, investment, tax, legal, accounting advice. You should consult your own investment, tax, legal and accounting advisors before engaging in any transaction. All content published by CryptoDataDownload is not an endorsement whatsoever. CryptoDataDownload was not compensated to submit this article. Please also visit our Privacy policy; disclaimer; and terms and conditions page for further information.

Latest Posts
Follow Us
Notify me of new content