خواندن دادههای قدیمی MetaStock در Python
خلاصه
سند میپرسد آیا فایلهای پایان روز قدیمی MetaStock را میتوان مستقیماً در pandas بارگذاری کرد. قالب را دودویی توصیف میکند و میگوید با چند نوع فایل ارتباط دارد، اما روش رمزگشایی یا جزئیات پیادهسازی را ارائه نمیدهد.
پاسخ پذیرفتهشده میگوید کتابخانههای رایج Python نمیتوانند این قالب قدیمی را مستقیماً بخوانند؛ بنابراین دادهها باید پیش از واردکردن به متن تبدیل شوند. پاسخ، تهیهٔ داده از ارائهدهندهای سازگار با Python را جایگزین سادهتری پیشنهاد میکند. این پاسخی کوتاه و قدیمی است، نه راهنمای فنی: تبدیل را نشان نمیدهد، ارائهدهندگان را با جزئیات مقایسه نمیکند و پشتیبانی ابزارهای جدیدتر از قالب را مشخص نمیسازد.
ایدههای کلیدی
- طبق پاسخ، دادههای قدیمی MetaStock در قالب دودویی ذخیره میشوند که کتابخانههای رایج Python مستقیماً نمیخوانند.
- راهکار پیشنهادی تبدیل فایلها به متن پیش از واردکردن آنها به pandas است.
- پاسخ استفاده از ارائهدهندهٔ داده دارای یکپارچگی با Python را جایگزین پیشنهاد میکند.
- سند نمونهای برای تبدیل یا شواهدی فراتر از ادعای پاسخدهنده ارائه نمیکند.
برچسبها
متن کامل
# Loading metastock data into panda data frames # Loading metastock data into panda data frames Most paid end-of-day data packages are available in metastock format. For analytics purposes, it will be nice if one can read the metastock data and load them into Python panda data frames. Is it possible to do this today? The metastock format I am referring to is the legacy (pre-12.0) MetaStock file format. It is a binary file format and originated from the Computrac file format. There are four files associated with the format: MASTER, EMASTER, XMASTER, FDAT, and F.MWD. ## Answer by Rehan (score 1, accepted) https://quant.stackexchange.com/a/32760 The binary data from MetaStock cannot be directly read into a pandas dataframe, or for the matter of fact, into any python library commonly known. For this you would need to convert it into text and then import, which simply complicates the process. The easier way to do this, would be to use Quandl - although it costs slightly higher than MetaStock, it ties in very well to Python, and you can import the requisite data in a jiffy.
با ذکر منبع و مطابق مجوز اثر، بهطور کامل نمایش داده میشود. مجوز: CC BY-SA 4.0 (Stack Exchange)
این خلاصه را عامل پژوهشی Stratmill بر پایه متن اصلی نوشته است؛ نسخهای از اثر منبع نیست.