Skip to content

Commit 0d186db

Browse files
committed
docs1
1 parent a09d094 commit 0d186db

File tree

8 files changed

+36
-38
lines changed

8 files changed

+36
-38
lines changed
-965 KB
Binary file not shown.

docs/source/api.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
2+
==================
13
MoabDB API
2-
##########
4+
==================
35

46
.. toctree::
57
:maxdepth: 2
@@ -11,9 +13,3 @@ MoabDB API
1113
api/get_bs
1214
api/get_cf
1315
api/get_is
14-
.. get_equity
15-
.. get_options
16-
.. get_rates
17-
.. get_is
18-
.. get_bs
19-
.. get_cf

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
html_theme = "sphinx_book_theme"
5454
html_title = f'<strong>{project}</strong> <i>{release}</i>'
55-
html_favicon = '_static/favicon.ico'
55+
html_favicon = '_static/favicon-32x32.ico'
5656
html_baseurl = 'https://docs.moabdb.com/'
5757
html_static_path = ['_static']
5858
html_css_files = ["custom.css"]

docs/source/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
7-
86
====================================
97
MoabDB API and Dataset Documentation
108
====================================

docs/source/tutorial.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
2+
==================
13
Getting Started
2-
###############
4+
==================
35

46
The tutorial series walks you through common problems and solutions
57
using python and MoabDB.

docs/source/tutorial/intraday_plot.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,21 @@ Prior to running this example, you should have the following:
3434

3535
.. code-block:: python
3636
37-
import configparser
3837
import moabdb as mdb
39-
import matplotlib.pyplot as plt
40-
import matplotlib.dates as mdates
4138
4239
# Constants defined here for flexibility
43-
TIC = 'MSFT'
44-
SAMPLE = '1d'
45-
DAY_START = '9:30'
46-
DAY_END = '16:00'
40+
# TIC = 'MSFT'
41+
# SAMPLE = '1d'
42+
# DAY_START = '9:30'
43+
# DAY_END = '16:00'
4744
48-
# Reading in credentials from config.ini file
4945
# Read credentials from config file
5046
config = configparser.ConfigParser()
5147
config.read('config.ini')
5248
email = config.get("Credentials", "email")
5349
api_key = config.get("Credentials", "api_key")
50+
51+
# MoabDB login
5452
mdb.login(email, api_key)
5553
5654

docs/source/tutorial/quickstart.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
2+
====================
13
Quickstart
2-
##########
4+
====================
35

46
Getting Started with MoabDB
5-
===========================
7+
---------------------------
68

79
Welcome to the MoabDB documentation! If you're new to MoabDB, this guide will help you set up and make your first API call.
810

911
Prerequisites
10-
-------------
12+
^^^^^^^^^^^^^
1113

1214
Before you begin:
1315

@@ -17,7 +19,7 @@ Before you begin:
1719

1820

1921
Install and Load Library
20-
========================
22+
------------------------
2123

2224
You can install the MoabDB library using ``pip``.
2325

@@ -34,7 +36,7 @@ Once installed, you can load the library in your Python code.
3436
3537
3638
Data Access without API Key
37-
===========================
39+
---------------------------
3840

3941
To access basic data, you do not need an API key.
4042
The ``get_equity()`` function can be used to
@@ -52,7 +54,7 @@ access end-of-day stock data.
5254
5355
5456
Advanced Data Access with API Key
55-
=================================
57+
---------------------------------
5658

5759
With an API key and subscription, intraday data and other
5860
advanced datasets are available.
@@ -65,7 +67,7 @@ credentials by either:
6567
You then can use the ``mdb.login()`` function to login with your credentials.
6668

6769
Manually Entering Credentials
68-
-----------------------------
70+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6971

7072
To access advanced data you must first login with your API key.
7173

@@ -79,7 +81,7 @@ To access advanced data you must first login with your API key.
7981
8082
8183
Using ``config.ini`` File for Credentials
82-
-----------------------------------------
84+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8385

8486
Instead of hardcoding your email and API key in the code, a safer practice is to store them in a configuration file.
8587
This method prevents the accidental exposure of sensitive credentials, especially if sharing or publishing your code.

docs/source/tutorial/simple_plot.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
2+
=================================
13
Plotting Daily-Level Stock Prices
2-
#################################
4+
=================================
35

46
.. image:: https://img.shields.io/pypi/v/moabdb.svg
57
:target: https://pypi.python.org/pypi/moabdb
68
:alt: PyPI Version
7-
9+
810
In this guide, we will walk you through the steps to retrieve
911
financial data using MoabDB and how to create a basic
1012
chart using the `matplotlib` library.
@@ -20,7 +22,7 @@ three examples of plotting data:
2022

2123

2224
Prerequisites
23-
=============
25+
-------------
2426

2527
- You will need `matplotlib` installed. If you haven't already, you can install it with:
2628

@@ -30,12 +32,12 @@ Prerequisites
3032
3133
3234
Plotting Single Stock with Daily-Level Data
33-
===========================================
35+
-------------------------------------------
3436

3537
First, let's retrieve some financial data. For this example, we'll fetch historical closing prices for a given stock (e.g., `MSFT`):
3638

3739
Import MoabDB and fetch data
38-
----------------------------
40+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3941

4042
.. code-block:: python
4143
@@ -52,7 +54,7 @@ Import MoabDB and fetch data
5254
5355
5456
Visualizing Data with Matplotlib
55-
--------------------------------
57+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5658

5759
With our data in hand, we can now plot it:
5860

@@ -88,12 +90,12 @@ With our data in hand, we can now plot it:
8890

8991

9092
Plotting Multiple Stocks with Daily-Level Data
91-
==============================================
93+
----------------------------------------------
9294

9395
First, let's retrieve some financial data. For this example, we'll fetch historical closing prices for a given stock (e.g., `AAPL`):
9496

9597
Import MoabDB and fetch data
96-
----------------------------
98+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9799

98100
.. code-block:: python
99101
@@ -110,7 +112,7 @@ Import MoabDB and fetch data
110112
111113
112114
Visualizing Data with Matplotlib
113-
--------------------------------
115+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114116

115117
With our data in hand, we can now plot it:
116118

@@ -147,7 +149,7 @@ With our data in hand, we can now plot it:
147149
:width: 80%
148150

149151
Plotting Cumulative Returns for Multiple Stocks
150-
===============================================
152+
-----------------------------------------------
151153

152154
To visualize the performance of various stocks over time,
153155
we'll compute and plot their cumulative returns. Mathematically, the
@@ -162,7 +164,7 @@ subtracted by 1. This gives us a percentage that we can plot over time.
162164

163165

164166
Compute and Visualize Cumulative Returns with Matplotlib
165-
--------------------------------------------------------
167+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
166168

167169
We can easily calculate cumulative return as price `t` divided by
168170
the initial price, and then subtracting 1 Let's compute this for our stocks:

0 commit comments

Comments
 (0)