Python, Good morning

Good morning is the name of a library that enables you to download data from stocks related to fundamentals.

I have uploaded the GIT file on my eclipse and I have shown some basic data in a data frame. This was something initially easy.

My goal is to draw data in a monthly basis for these fundamentals and be able to compare with other datasets. By the moment I’m not able to show data by at least in a monthly basis.

The code of my basic test:

import good_morning as gm

kr = gm.KeyRatiosDownloader()
frames = kr.download(‘T’)

count = 0
frame_size = len(frames)
while (count < frame_size):
         print( ‘The count is:’, count)
print(frames[count])

count = count + 1

print(“Good bye!”)

Pydev with Eclipse

I find EMACS too much complex for me. I want to concentrate on the analysis of data with Pyhton, so I have looked for and alternative IDE for Python: Pydev.

The steps I have followed are:

  1. Download and install Eclipse (in reality I had it on my computer).
  2. Then, download, install and test Phyton.
  3. Once done, download and install Jython.
  4. Download and install IronPython.
  5. Install PyDev.
  6. Create a new PyDev project.
  7. I have created a hello.py file with print(“hello world”), then I have debugged it and it worked.
  8. Create a package to gather all the information.
  9. The set-up of the environment is very well explained. You first have to configure the interpreter, then you can develop all you need. In my case I’m starting importing some finance data from Yahoo Finance.
  10. Using Windows>Properties>Python Interpreter , install library “numpy” using “pip” as installer. This step is crucial to me as Python interpreter just work on PyDev in my computer.

EMACS

I’m sure EMACS runs faster and it’s more efficient than Eclipse, but the point is that now I can concentrate on the development of the scripts I want to implement. 🙂

EMACS, how to install it for Python purposes

What IDE should I start with?

I have asked about some different IDEs for Python and this was the short list: EMACS, jupyter, syder and anaconda.

Then, I asked my friend: what is the more convenient for a basic learner as me? EMACS.

So this is the one I have installed. The basis of how to use EMACS can be read here. The guidelines recommends the installation of Elpy so this is the next step I have done.

Elpy – Python Development

Emacs is distributed with a python-mode (python.el), but if we want to have a more sophisticated IDE you can install Elpy (Emacs Lisp Python Environment) package.

Before to install Elpy, you have to install these 2 packages:

  • Flake8: flymake-python-pyflakes.
  • Jedi.

The document I used to install it is this one.

The issue I’m finding is that the these 2 packages are legacy and they seem to not work properly. I’m sure that in reality the issue is that I’m not able to enable them in the right way or to enable python properly. I’m stuck here by the moment.

Python extensions

Some basic notes about the python files extensions:

  • .py: This is normally the input source code that you’ve written (the basis).
  • .pyc : This is the compiled bytecode. If you import a module, python will build a *.pyc file that contains the bytecode to make importing it again later easier (and faster).
  • .pyo: This is a *.pyc file that was created while optimizations (-O) was on.
  • .pyd: This is basically a windows dll file. http://docs.python.org/faq/windows.html#is-a-pyd-file-the-same-as-a-dll

EMACS basic commands I have learned today.

  • M-x list-packages: list the available packages you have in EMACS
  • M-x customize-group: enable you to customize a package (in my case: “package”. I have added Melpa packages to the list so these packages can be installed.
  • M-x package-install: to perform the installation of a package.

This video shows you how to install a package: .Emacs #3 – Installing Packages and Extensions. The series of videos are useful for new users as me.

Analysis of data with Python

The main goal is to learn, but not just through the completion of courses or certifications. After the achieving the PMP certification I though about a project to focus on programming and data analysis.

My goal is Learn Python is my next project. I have defined 3 months of project where I would like to achieve a goal.

Following the V2MOM model:

  • Vision: Be able to analyze data and predict behaviors.
  • Values: have fun, learn a lot, build a team with Dani, do practices and more practices.
  • Method: learn python, learn about patterns.
  • Obstacles: Time.
  • Measures: have an environment where I test a pattern with real time data from an external source. Have a list of learned lessons and experience.

Death line = December 2017