observe the following signal s, and model trend predictions p 

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
%matplotlib inline
s = np.round((np.random.normal(size=20)*5+.5).cumsum()+100,2)
p = (np.random.random(size=len(s)-1)>.3).astype(int)
print (s.shape, p.shape)

plt.plot(s, color="black")
plt.scatter(np.arange(len(p))[p==0], s[:-1][p==0], color="red", label="prediction down")
plt.scatter(np.arange(len(p))[p==1], s[:-1][p==1], color="blue", label="prediction up")
plt.grid(); plt.legend(); plt.xlabel("time instant"); plt.ylabel("price")
plt.xticks(range(len(s)), range(len(s)))
pd.DataFrame(np.vstack((s,list(p)+[np.nan])), index=["signal", "prediction"])
print ("SIGNAL    ", s)
print ("PREDICTION", p)

SIGNAL     [ 92.88  90.96  94.72  89.5   87.1   94.69  87.64  87.08  85.47  88.02
  90.72  97.44  99.37  94.65  91.76  97.29  93.15  95.55 102.04 106.61]
PREDICTION [1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 0]


fill in the pnl variable below with a list of 19 values corresponding on applying the same strategy as in the notes, buying or selling always ONE money unit:

if the prediction is zero, we believe the price is going down, so we sell ONE money unit at the current price and buy it at the next instant of time
if the prediction is one, we do the opposite
BUT there is a commission of 1%, applied on the instant you make the first operation (which uses the current price)
observe that there are 20 signal points, and 19 predictions.

fill in the following variable:

pnl = [... ]