קריאת נתוני MetaStock ישנים ב-Python
מאמר Quant Q&A · מחבר: curious
סיכום
המסמך שואל אם אפשר לטעון ישירות ל-pandas קובצי סוף יום ישנים של MetaStock. הוא מתאר את הפורמט כבינארי ומציין שהוא קשור לכמה סוגי קבצים, אך אינו מספק שיטת פענוח או פרטי מימוש.
לפי התשובה שהתקבלה, ספריות 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 על סמך המקור; הוא אינו העתק של המקור.