Skip to content
KevinYuann edited this page Nov 17, 2022 · 12 revisions

How to run tradebooks

  1. set up environement as in readme
  2. click run
  3. see plots
  4. play with variables

Multi-dimensional Visualization

If you want to draw plots in higher dimensions than 2D, here's how. The hypercast() function is built exactly for this purpose.

Code snippet:

from architect.libs.utillib import hypercast

x = np.arange(start=0, stop=10, step=1)
y = np.arange(start=0, stop=20, step=1)

x_hyper, y_hyper = hypercast(a, b)

z = some_function(a, b)

What's happening under the hood is that the function is converting the input of multiple 1D arrays into multiple hypercubes that can be described by an n-dimensional array.

Image of 4-D Hypercube (Image from Wikipedia)

The most important feature to note that is that all of these hypercubes will be of the shape size-wise, allowing us to easily use them in functions. Another feature that is important to mention is that the orientation of the array will depend on the order in which the 1D arrays are passed into the function.

Clone this wiki locally