Hello community,

here is the log from the commit of package octave-forge-financial for 
openSUSE:Factory checked in at 2018-07-28 12:40:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-financial (Old)
 and      /work/SRC/openSUSE:Factory/.octave-forge-financial.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "octave-forge-financial"

Sat Jul 28 12:40:19 2018 rev:3 rq:624037 version:0.5.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/octave-forge-financial/octave-forge-financial.changes
    2017-02-03 17:51:43.649735744 +0100
+++ 
/work/SRC/openSUSE:Factory/.octave-forge-financial.new/octave-forge-financial.changes
       2018-07-28 12:40:21.360420417 +0200
@@ -1,0 +2,11 @@
+Wed Jul 18 07:39:56 UTC 2018 - [email protected]
+
+- Update to version 0.5.1:
+  * The following functions are new: candle
+  * A bug in the `fetch` function that broke retrieving
+    financial data from Google is now fixed.
+  * Due to Yahoo retiring the option to download financial
+    data, Yahoo support in the `fetch` function has now been
+    removed.
+
+-------------------------------------------------------------------

Old:
----
  financial-0.5.0.tar.gz

New:
----
  financial-0.5.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ octave-forge-financial.spec ++++++
--- /var/tmp/diff_new_pack.SgPSb8/_old  2018-07-28 12:40:22.964423500 +0200
+++ /var/tmp/diff_new_pack.SgPSb8/_new  2018-07-28 12:40:22.964423500 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package octave-forge-financial
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,10 +18,10 @@
 
 %define octpkg  financial
 Name:           octave-forge-%{octpkg}
-Version:        0.5.0
+Version:        0.5.1
 Release:        0
 Summary:        Financial instruments for Octave
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Group:          Productivity/Scientific/Math
 Url:            http://octave.sourceforge.net
 Source0:        
http://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz

++++++ financial-0.5.0.tar.gz -> financial-0.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/DESCRIPTION 
new/financial-0.5.1/DESCRIPTION
--- old/financial-0.5.0/DESCRIPTION     2016-02-01 04:16:35.820291837 +0100
+++ new/financial-0.5.1/DESCRIPTION     2017-12-14 21:15:40.764385134 +0100
@@ -1,12 +1,11 @@
 Name: financial
-Version: 0.5.0
-Date: 2016-01-31
-Author: Bill Denney <[email protected]>, Kurt Hornik <[email protected]>
+Version: 0.5.1
+Date: 2017-12-14
+Author: Bill Denney, Kurt Hornik
 Maintainer: Parsiad Azimzadeh <[email protected]>
 Title: Financial
-Description: Monte Carlo simulation, options pricing routines,
- financial manipulation, plotting functions and additional date manipulation
- tools.
+Description: Monte Carlo simulation, options pricing routines, financial
+  manipulation, plotting functions and additional date manipulation tools.
 Depends: octave (>= 4.0.0), io (>= 1.0.18)
 Autoload: no
 License: GPLv3+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/INDEX new/financial-0.5.1/INDEX
--- old/financial-0.5.0/INDEX   2016-02-01 04:16:35.820291837 +0100
+++ new/financial-0.5.1/INDEX   2017-12-14 21:15:40.764385134 +0100
@@ -1,16 +1,5 @@
 financial >> Financial
 Financial
- binprice
- blkimpv
- blkprice
- blsdelta
- blsgamma
- blsimpv
- blslambda
- blsprice
- blsrho
- blstheta
- blsvega
  cfconv
  cfdur
  corr2cov
@@ -31,7 +20,6 @@
  nper
  npv
  onbalvol
- opprofit
  pmt
  posvolidx
  pvl
@@ -41,12 +29,26 @@
  taxedrr
  vol
  yahoo
-Plot
+Chart Financial Data
  bolling
+ candle
  dateaxis
  highlow
  pointfig
  renko
+Price and Analyze Financial Instruments
+ binprice
+ blkimpv
+ blkprice
+ blsdelta
+ blsgamma
+ blsimpv
+ blslambda
+ blsprice
+ blsrho
+ blstheta
+ blsvega
+ opprofit
 Stochastic Differential Equation (SDE) Models
  @diffusion/diffusion
  @drift/drift
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/NEWS new/financial-0.5.1/NEWS
--- old/financial-0.5.0/NEWS    2016-02-01 04:16:35.820291837 +0100
+++ new/financial-0.5.1/NEWS    2017-12-14 21:15:40.767718468 +0100
@@ -1,3 +1,18 @@
+Summary of important user-visible changes for financial 0.5.1:
+--------------------------------------------------------------
+
+ ** The following functions are new:
+
+      candle
+
+ ** A bug in the `fetch` function that broke retrieving
+    financial data from Google is now fixed.
+
+ ** Due to Yahoo retiring the option to download financial
+    data, Yahoo support in the `fetch` function has now been
+    removed.
+
+
 Summary of important user-visible changes for financial 0.5.0:
 --------------------------------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/@diffusion/diffusion.m 
new/financial-0.5.1/inst/@diffusion/diffusion.m
--- old/financial-0.5.0/inst/@diffusion/diffusion.m     2016-02-01 
04:16:35.820291837 +0100
+++ new/financial-0.5.1/inst/@diffusion/diffusion.m     2017-12-14 
21:15:40.767718468 +0100
@@ -16,17 +16,17 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{DiffusionRate} =} diffusion (@var{Alpha}, 
@var{Sigma})
 ## Creates an object to represent the diffusion rate of a stochastic
-## differential equation (SDE):
+## differential equation (SDE).
 ##
 ## @center @var{DiffusionRate}(t, X_t) = diag(X_t.^Alpha(t)) * V(t)
 ## @center dX_t = DriftRate(t, X_t)dt + @var{DiffusionRate}(t, X_t)dW_t.
 ##
-## @itemize @bullet
+## @itemize
 ## @item (X_t) is an NVARS-dimensional process;
 ## @item (W_t) is an NBROWNS-dimensional Wiener process.
 ## @end itemize
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Alpha} An NVARS-by-1 vector or a function. As a function,
 ## @var{Alpha} returns an NVARS-by-1 vector and has either exactly one input
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/@drift/drift.m 
new/financial-0.5.1/inst/@drift/drift.m
--- old/financial-0.5.0/inst/@drift/drift.m     2016-02-01 04:16:35.823625173 
+0100
+++ new/financial-0.5.1/inst/@drift/drift.m     2017-12-14 21:15:40.767718468 
+0100
@@ -16,17 +16,17 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{DriftRate} =} drift (@var{A}, @var{B})
 ## Creates an object to represent the drift rate of a stochastic differential
-## equation (SDE):
+## equation (SDE).
 ##
 ## @center @var{DriftRate}(t, X_t) = A(t) + B(t) * X_t
 ## @center dX_t = @var{DriftRate}(t, X_t)dt + DiffusionRate(t, X_t)dW_t.
 ##
-## @itemize @bullet
+## @itemize
 ## @item (X_t) is an NVARS-dimensional process;
 ## @item (W_t) is an NBROWNS-dimensional Wiener process.
 ## @end itemize
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{A} An NVARS-by-1 vector or a function. As a function, @var{A}
 ## returns an NVARS-by-1 vector and has either exactly one input (time:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/@sde/sde.m 
new/financial-0.5.1/inst/@sde/sde.m
--- old/financial-0.5.0/inst/@sde/sde.m 2016-02-01 04:16:35.823625173 +0100
+++ new/financial-0.5.1/inst/@sde/sde.m 2017-12-14 21:15:40.771051802 +0100
@@ -16,16 +16,16 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{SDE} =} sde (@var{DriftRate}, 
@var{DiffusionRate})
 ## @deftypefnx {Function File} {@var{SDE} =} sde (@var{DriftRate}, 
@var{DiffusionRate}, @var{OptionName}, @var{OptionValue}, @dots{})
-## Creates an object to represent a stochastic differential equation (SDE):
+## Creates an object to represent a stochastic differential equation (SDE).
 ##
 ## @center dX_t = @var{DriftRate}(t, X_t)dt + @var{DiffusionRate}(t, X_t)dW_t.
 ##
-## @itemize @bullet
+## @itemize
 ## @item (X_t) is an NVARS-dimensional process;
 ## @item (W_t) is an NBROWNS-dimensional Wiener process.
 ## @end itemize
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{DriftRate} A drift object or function that returns an
 ## NVARS-by-1 vector.
@@ -35,7 +35,7 @@
 ## @end itemize
 ##
 ## A list of options recognized by sde are given below:
-## @itemize @bullet
+## @itemize
 ## @item StartTime - Time of the first observation. If unspecified, the default
 ##                   is 0.
 ## @item StartState - Scalar, NVARS-dimensional column vector, or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/@sde/simByEuler.m 
new/financial-0.5.1/inst/@sde/simByEuler.m
--- old/financial-0.5.0/inst/@sde/simByEuler.m  2016-02-01 04:16:35.823625173 
+0100
+++ new/financial-0.5.1/inst/@sde/simByEuler.m  2017-12-14 21:15:40.771051802 
+0100
@@ -17,7 +17,7 @@
 ## @deftypefn  {Function File} {[@var{Paths}, @var{Times}, @var{Z}] =} 
simByEuler (@var{SDE}, @var{Periods}, @var{OptionName}, @var{OptionValue}, 
@dots{})
 ## Simulates a stochastic differential equation (SDE) using Euler timestepping.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{SDE} An sde object.
 ## @item
@@ -25,7 +25,7 @@
 ## @end itemize
 ##
 ## A list of options recognized by simByEuler are given below:
-## @itemize @bullet
+## @itemize
 ## @item NTRIALS - Number of sample paths to use in simulation.
 ##                 If unspecified, the default is 1.
 ## @item DeltaTime - Scalar or NPERIODS-dimensional vector of timesteps.
@@ -40,7 +40,7 @@
 ##           of random samples to use in the simulation.
 ##           Alternatively, a function returning an NBROWNS-dimensional column
 ##           vector can be specified, with inputs:
-## @itemize @bullet
+## @itemize
 ## @item A real-valued observation time t;
 ## @item An NVARS-dimensional state vector X_t.
 ## @end itemize
@@ -65,7 +65,7 @@
 ## @end itemize
 ##
 ## The outputs are described below:
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Paths} (NPERIODS + 1)-by-NVARS-by-NTRIALS array consisting of
 ## the simulated paths.
@@ -79,7 +79,7 @@
 ##
 ## The method will attempt to use a fast broadcasting implementation whenever
 ## possible. This is possible when the following requirements are met:
-## @itemize @bullet
+## @itemize
 ## @item The methods Drift(t, X) (resp. Diffusion(t, X)) of the @var{SDE} 
object
 ##       return an NVARS-by-1-by-NTRIALS (resp. NVARS-by-NBROWNS-by-NTRIALS)
 ##       array when X is an NVARS-by-1-by-NTRIALS array.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/@sde/simulate.m 
new/financial-0.5.1/inst/@sde/simulate.m
--- old/financial-0.5.0/inst/@sde/simulate.m    2016-02-01 04:16:35.826958510 
+0100
+++ new/financial-0.5.1/inst/@sde/simulate.m    2017-12-14 21:15:40.771051802 
+0100
@@ -17,7 +17,7 @@
 ## @deftypefn  {Function File} {[@var{Paths}, @var{Times}, @var{Z}] =} 
simulate (@var{SDE}, @dots{})
 ## Simulates a stochastic differential equation (SDE).
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{SDE} An sde object.
 ## @end itemize
@@ -26,7 +26,7 @@
 ## specified by the sde object.
 ##
 ## The outputs are described below:
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Paths} (NPERIODS + 1)-by-NVARS-by-NTRIALS array consisting of
 ## the simulated paths.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/binprice.m 
new/financial-0.5.1/inst/binprice.m
--- old/financial-0.5.0/inst/binprice.m 2016-02-01 04:16:35.826958510 +0100
+++ new/financial-0.5.1/inst/binprice.m 2017-12-14 21:15:40.774385136 +0100
@@ -19,7 +19,7 @@
 ## @deftypefnx {Function File} {[@var{AssetPrice}, @var{OptionValue}] =} 
binprice (@var{Price}, @var{Strike}, @var{Rate}, @var{Time}, @var{Increment}, 
@var{Volatility}, @var{OptType}, @var{DividendRate}, @var{Dividend}, 
@var{ExDiv})
 ## Compute American call and put option prices using a binomial tree.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blkimpv.m 
new/financial-0.5.1/inst/blkimpv.m
--- old/financial-0.5.0/inst/blkimpv.m  2016-02-01 04:16:35.826958510 +0100
+++ new/financial-0.5.1/inst/blkimpv.m  2017-12-14 21:15:40.774385136 +0100
@@ -20,7 +20,7 @@
 ## @deftypefnx {Function File} {@var{Volatility} =} blkimpv (@var{Price}, 
@var{Strike}, @var{Rate}, @var{Time}, @var{Value}, @var{Limit}, 
@var{Tolerance}, @var{Class})
 ## Compute implied volatility under the Black-Scholes model.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset (a futures
 ## contract).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blkprice.m 
new/financial-0.5.1/inst/blkprice.m
--- old/financial-0.5.0/inst/blkprice.m 2016-02-01 04:16:35.826958510 +0100
+++ new/financial-0.5.1/inst/blkprice.m 2017-12-14 21:15:40.774385136 +0100
@@ -17,7 +17,7 @@
 ## @deftypefn {Function File} {[@var{Call}, @var{Put}] =} blkprice 
(@var{Price}, @var{Strike}, @var{Rate}, @var{Time}, @var{Volatility})
 ## Compute European call and put option price using the Black-76 model.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset (a futures
 ## contract).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blsdelta.m 
new/financial-0.5.1/inst/blsdelta.m
--- old/financial-0.5.0/inst/blsdelta.m 2016-02-01 04:16:35.826958510 +0100
+++ new/financial-0.5.1/inst/blsdelta.m 2017-12-14 21:15:40.774385136 +0100
@@ -16,8 +16,10 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {[@var{CallDelta}, @var{PutDelta}] =} blsdelta 
(@var{Price}, @var{Strike}, @var{Rate}, @var{Time}, @var{Volatility})
 ## @deftypefnx {Function File} {[@var{CallDelta}, @var{PutDelta}] =} blsdelta 
(@var{Price}, @var{Strike}, @var{Rate}, @var{Time}, @var{Volatility}, 
@var{Yield})
+## Computes the Black-Scholes delta, the rate of change of the option value 
with
+## respect to the value of the underlying asset.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset.
 ## @item
@@ -33,8 +35,6 @@
 ## compounded rate of dividends of the underlying asset.
 ## @end itemize
 ##
-## Computes the Black-Scholes delta, the rate of change of the option value 
with
-## respect to the value of the underlying asset.
 ##
 ## @seealso{blsgamma, blslambda, blsprice, blsrho, blstheta, blsvega}
 ## @end deftypefn
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blsgamma.m 
new/financial-0.5.1/inst/blsgamma.m
--- old/financial-0.5.0/inst/blsgamma.m 2016-02-01 04:16:35.830291847 +0100
+++ new/financial-0.5.1/inst/blsgamma.m 2017-12-14 21:15:40.774385136 +0100
@@ -18,7 +18,7 @@
 ## @deftypefnx {Function File} {@var{Gamma} =} blsgamma (@var{Price}, 
@var{Strike}, @var{Rate}, @var{Time}, @var{Volatility}, @var{Yield})
 ## Compute Black-Scholes gamma.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blsimpv.m 
new/financial-0.5.1/inst/blsimpv.m
--- old/financial-0.5.0/inst/blsimpv.m  2016-02-01 04:16:35.830291847 +0100
+++ new/financial-0.5.1/inst/blsimpv.m  2017-12-14 21:15:40.774385136 +0100
@@ -21,7 +21,7 @@
 ## @deftypefnx {Function File} {@var{Volatility} =} blsimpv (@var{Price}, 
@var{Strike}, @var{Rate}, @var{Time}, @var{Value}, @var{Limit}, @var{Yield}, 
@var{Tolerance}, @var{Class})
 ## Computes implied volatility under the Black-Scholes model.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blslambda.m 
new/financial-0.5.1/inst/blslambda.m
--- old/financial-0.5.0/inst/blslambda.m        2016-02-01 04:16:35.830291847 
+0100
+++ new/financial-0.5.1/inst/blslambda.m        2017-12-14 21:15:40.774385136 
+0100
@@ -18,7 +18,7 @@
 ## @deftypefnx {Function File} {[@var{CallEl}, @var{PutEl}] =} blslambda 
(@var{Price}, @var{Strike}, @var{Rate}, @var{Time}, @var{Volatility}, 
@var{Yield})
 ## Computes elasticity of option under the Black-Scholes model.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blsprice.m 
new/financial-0.5.1/inst/blsprice.m
--- old/financial-0.5.0/inst/blsprice.m 2016-02-01 04:16:35.830291847 +0100
+++ new/financial-0.5.1/inst/blsprice.m 2017-12-14 21:15:40.774385136 +0100
@@ -18,7 +18,7 @@
 ## @deftypefnx {Function File} {[@var{Call}, @var{Put}] =} blsprice 
(@var{Price}, @var{Strike}, @var{Rate}, @var{Time}, @var{Volatility}, 
@var{Yield})
 ## Compute European call and put option prices.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blstheta.m 
new/financial-0.5.1/inst/blstheta.m
--- old/financial-0.5.0/inst/blstheta.m 2016-02-01 04:16:35.830291847 +0100
+++ new/financial-0.5.1/inst/blstheta.m 2017-12-14 21:15:40.777718471 +0100
@@ -18,7 +18,7 @@
 ## @deftypefnx {Function File} {[@var{CallTheta}, @var{PutTheta}] =} blstheta 
(@var{Price}, @var{Strike}, @var{Rate}, @var{Time}, @var{Volatility}, 
@var{Yield})
 ## Compute the Black-Scholes theta.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/blsvega.m 
new/financial-0.5.1/inst/blsvega.m
--- old/financial-0.5.0/inst/blsvega.m  2016-02-01 04:16:35.830291847 +0100
+++ new/financial-0.5.1/inst/blsvega.m  2017-12-14 21:15:40.777718471 +0100
@@ -18,7 +18,7 @@
 ## @deftypefnx {Function File} {@var{Vega} =} blsvega (@var{Price}, 
@var{Strike}, @var{Rate}, @var{Time}, @var{Volatility}, @var{Yield})
 ## Computes the Black-Scholes vega.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Price} The current price of the underlying asset.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/bm.m 
new/financial-0.5.1/inst/bm.m
--- old/financial-0.5.0/inst/bm.m       2016-02-01 04:16:35.833625183 +0100
+++ new/financial-0.5.1/inst/bm.m       2017-12-14 21:15:40.777718471 +0100
@@ -16,7 +16,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{BM} =} bm (@var{Mu}, @var{Sigma})
 ## @deftypefnx {Function File} {@var{BM} =} bm (@var{Mu}, @var{Sigma}, 
@var{OptionName}, @var{OptionValue}, @dots{})
-## Creates an object to represent an arithmetic Brownian motion:
+## Creates an object to represent an arithmetic Brownian motion.
 ##
 ## @center dX_t = @var{Mu}(t)dt + @var{Sigma}(t)dW_t.
 ##
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/candle.m 
new/financial-0.5.1/inst/candle.m
--- old/financial-0.5.0/inst/candle.m   1970-01-01 01:00:00.000000000 +0100
+++ new/financial-0.5.1/inst/candle.m   2017-12-14 21:15:40.777718471 +0100
@@ -0,0 +1,319 @@
+## Copyright (C) 2017 dekalog (https://dekalogblog.blogspot.com)
+##
+## This program is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {Function File} candle (@var{HighPrices}, @var{LowPrices}, 
@var{ClosePrices}, @var{OpenPrices})
+## @deftypefnx {Function File} candle (@var{HighPrices}, @var{LowPrices}, 
@var{ClosePrices}, @var{OpenPrices}, @var{color})
+## @deftypefnx {Function File} candle (@var{HighPrices}, @var{LowPrices}, 
@var{ClosePrices}, @var{OpenPrices}, @var{color}, @var{dates})
+## @deftypefnx {Function File} candle (@var{HighPrices}, @var{LowPrices}, 
@var{ClosePrices}, @var{OpenPrices}, @var{color}, @var{dates}, @var{dateform})
+## Plot the @var{HighPrices}, @var{LowPrices}, @var{ClosePrices} and 
@var{OpenPrices} of a security as a candlestick chart.
+##
+## @itemize
+## @item
+## Variable: @var{HighPrices} Column vector of high prices for a security.
+## @item
+## Variable: @var{LowPrices} Column vector of low prices for a security.
+## @item
+## Variable: @var{ClosePrices} Column vector of close prices for a security.
+## @item
+## Variable: @var{OpenPrices} Column vector of open prices for a security.
+## @item
+## Variable: @var{Color} (Optional, default = "brwk") Candlestick color is
+## specified as a case insensitive four character row vector, e.g. "brwk". The
+## characters that are accepted are k, b, c, r, m, w, g and y for black, blue,
+## cyan, red, magenta, white, green and yellow respectively. Default colors are
+## "brwk" applied in order to bars where the closing price is greater than the
+## opening price, bars where the closing price is less than the opening price,
+## the chart background color and the candlestick wicks. If fewer than four
+## colors are specified, they are applied in turn in the above order with
+## default colors for unspecified colors. For example, user supplied colors
+## "gm" will plot green upbars and magenta downbars with a default white
+## background and black wicks. If the user specified color for background is
+## black, without specifying the wick color, e.g. "gmk", the default wick color
+## is white. All other choices for background color will default to black for
+## wicks. If all four colors are user specified, those colors will be used. 
Doji
+## bars and single price bars, e.g. open = high = low = close, are plotted with
+## the color for wicks, with single price bars being plotted as points/dots.
+## @item
+## Variable: @var{Dates} (Optional) Dates for user specified x-axis tick 
labels.
+## Dates can be a serial date number column (see datenum), a datevec matrix 
(See
+## datevec) or a character vector of dates. If specified as either a datenum or
+## a datevec, the @var{Dateform} argument is required.
+## @item
+## Variable: @var{Dateform} (Optional) Either a date character string or a
+## single integer code number used to format the x-axis tick labels (See
+## datestr). Only required if @var{Dates} is specified as a serial date number
+## column (See datenum) or a datevec matrix (See datevec).
+## @end itemize
+##
+## @seealso{datenum, datestr, datevec, highlow, bolling, dateaxis, movavg,
+## pointfig}
+## @end deftypefn
+
+function candle (varargin)
+
+  ## Input checking
+  if (nargin < 4 || nargin > 7)
+    print_usage ();
+  endif
+  HighPrices = varargin{1};
+  LowPrices = varargin{2};
+  ClosePrices = varargin{3};
+  OpenPrices = varargin{4};
+  if (nargin == 4)
+    color = "brwk";
+  endif
+  if (nargin >= 5)
+    color = varargin{5};
+  endif
+  if (nargin >= 6)
+    dates = varargin{6};
+  endif
+  if (nargin >= 7)
+    dateform = varargin{7};
+  endif
+  function retval = is_price_vector (prices)
+    retval = isnumeric (prices) && isvector (prices) && iscolumn (prices);
+  endfunction
+  if ( ! (is_price_vector (HighPrices) && is_price_vector (LowPrices) && ...
+          is_price_vector (ClosePrices) && is_price_vector (OpenPrices) ) )
+    error ("candle: prices must be numeric column vector");
+  endif
+  num_points = length (HighPrices);
+  if ( ! (num_points == length (LowPrices) && ...
+          num_points == length (ClosePrices) && ...
+          num_points == length (OpenPrices) ) )
+    error ("candle: price vectors must be of the same size");
+  endif
+
+  ## Make figure
+  fig = figure;
+  washold = ishold;
+  hold on;
+
+  ## Is color a character vector?
+  if (ischar (color) && size (color, 1) == 1)
+    if (size (color, 2) == 1)                      # only one color has been 
user specified
+      color = [tolower(color) "rwk"];              # so add default colors for 
down bars, background and wicks
+    elseif (size (color, 2) == 2)                  # two colors have been user 
specified
+      color = [tolower(color) "wk"];               # so add default colors for 
background and wicks
+    elseif (size (color, 2) == 3)                  # three colors have been 
user specified
+      if (color(3) == "k" || color(3) == "K")      # if user selected 
background is black
+       color = [tolower(color) "w"];               # set wicks to default white
+      else
+       color = [tolower(color) "k"];               # else default black wicks
+      endif
+    elseif (size (color, 2) >= 4)                  # all four colors have been 
user specified, extra character inputs ignored
+      color = tolower (color);                     # correct in case user 
input contains upper case e.g. "BRWK"
+    endif
+  else
+    warning ("candle: COLOR should be a character row vector; ignoring user 
input");
+    color = "brwk";
+  endif                                            # end of nargin >= 5 && 
ischar (color) && size (color, 1) == 1 if statement
+
+  x = 1 : num_points;
+  wicks = HighPrices .- LowPrices;
+  body = ClosePrices .- OpenPrices;
+  up_down = sign (body);
+  scaling = 10 / num_points;
+  body_width = max(20 * scaling, 1);
+  wick_width = 1;
+  doji_size = 10 * max(scaling, 1);
+  one_price_size = 2 * max(scaling, 1);
+
+  ## Background color
+  plot (HighPrices, color(3), LowPrices, color(3));
+  fill ( [ min(xlim) max(xlim) max(xlim) min(xlim) ], ...
+         [ min(ylim) min(ylim) max(ylim) max(ylim) ], color(3) );
+
+  function [X, Y] = helper(idx, hi, lo)
+    high_nan = low_nan = nan (num_points, 1);
+    high_nan(idx) = hi(idx);
+    low_nan(idx) = lo(idx);
+    X = reshape ([ x           ; x          ; nan(1, num_points) ], [], 1);
+    Y = reshape ([ high_nan(:)'; low_nan(:)'; nan(1, num_points) ], [], 1);
+  endfunction
+
+  ## Plot the wicks
+  [X, Y] = helper(1 : num_points, HighPrices, LowPrices);
+  plot (X, Y, color(4), "linewidth", wick_width);
+
+  ## FIXME: Use rectangle bar bodies
+
+  ## Plot the up bar bodies
+  [X, Y] = helper (find (up_down == 1), ClosePrices, OpenPrices);
+  plot (X, Y, color(1), "linewidth", body_width);
+
+  ## Plot the down bar bodies
+  [X, Y] = helper (find (up_down == -1), OpenPrices, ClosePrices);
+  plot (X, Y, color( 2 ), "linewidth", body_width);
+
+  ## Doji bars
+  doji_ix = find ((HighPrices > LowPrices) .* (ClosePrices == OpenPrices));
+  if (length (doji_ix) >= 1)
+    plot (x(doji_ix), ClosePrices(doji_ix), ["+" char(color(4))], 
"markersize", doji_size);
+  endif
+
+  ## Prices all the same
+  one_price_ix = find ((HighPrices == LowPrices) .* (HighPrices == OpenPrices) 
.* (HighPrices == ClosePrices));
+  if (length (one_price_ix) >= 1)
+    plot (x(one_price_ix), ClosePrices(one_price_ix), ["." char(color(4))], 
"markersize", one_price_size);
+  endif
+
+  ## Revert to previous value of hold
+  if (! washold)
+    hold off
+  endif
+
+  ## No date argument
+  if (nargin < 6)
+    return
+  endif
+  if (! ismatrix (dates))
+    warning ("candle: DATES must be a matrix; ignoring DATES");
+    return
+  endif
+  if (! (isnumeric (dates) || ischar (dates)))
+    warning ("candle: DATES must be of numeric or character type");
+    return
+  endif
+  if (size (dates, 1) != num_points)
+    warning ("candle: DATES and price vectors must be of the same length; 
ignoring DATES");
+    return
+  endif
+  if (nargin < 7 && isnumeric (dates))
+    warning ("candle: if DATES is a serial date number (see datenum) or a 
datevec matrix (see datevec), DATEFORM is required; ignoring DATES");
+    return
+  endif
+  if (nargin >= 7)
+    if (ischar (dates))
+      warning ("candle: DATES is of character type but DATEFORM is also 
specified; ignoring DATES");
+      return
+    endif
+    if (isnumeric (dateform) && (dateform < 0 || dateform > 31))
+      warning ("candle: DATEFORM integer code number is out of bounds (See 
datestr); ignoring DATES");
+      return
+    elseif (isnumeric (dateform) && rem (dateform, 1) > 0)
+      warning ("candle: DATEFORM code number should be an integer 0 - 31 (See 
datestr); ignoring DATES");
+      return
+    endif
+    if (size (dates, 2) == 1)
+      is_monotonically_increasing = sum (dates == cummax (dates)) / size 
(dates, 1);
+      if (is_monotonically_increasing != 1)
+        warning ("candle: DATES does not appear to be a serial date number 
column as it is not monotonically increasing; ignoring DATES");
+        return
+      endif
+    endif
+  endif
+
+  if (nargin == 6)
+    ticks = cellstr (dates);
+  else
+    ticks = datestr (dates, dateform);
+    ticks = mat2cell (ticks, ones (size (ticks, 1), 1), size (ticks, 2));
+  endif
+
+  ## FIXME: choose the number of ticks in a smarter way
+  num_ticks = 5;
+  xx = 1 : floor(num_points / num_ticks) : num_points;
+
+  h = gca ();
+  set (h, "xtick", xx);
+  set (h, ["x" "ticklabel"], ticks(xx));
+
+endfunction
+
+%!demo 1
+%! close();
+%! OpenPrices = [ 1292.4; 1291.7; 1291.8; 1292.2; 1291.5; 1291.0; 1291.0; 
1291.5; 1291.7; 1291.5; 1290.7 ];
+%! HighPrices = [ 1292.6; 1292.1; 1292.5; 1292.3; 1292.2; 1292.2; 1292.7; 
1292.4; 1292.3; 1292.1; 1292.9 ];
+%! LowPrices = [ 1291.3; 1291.3; 1291.7; 1291.1; 1290.7; 1290.2; 1290.3; 
1291.1; 1291.2; 1290.5; 1290.4 ];
+%! ClosePrices = [ 1291.8; 1291.7; 1292.2; 1291.5; 1291.0; 1291.1; 1291.5; 
1291.7; 1291.6; 1290.8; 1292.8 ];
+%! candle( HighPrices, LowPrices, ClosePrices, OpenPrices );
+%! title("default plot.");
+
+%!demo 2
+%! close();
+%! OpenPrices = [ 1292.4; 1291.7; 1291.8; 1292.2; 1291.5; 1291.0; 1291.0; 
1291.5; 1291.7; 1291.5; 1290.7 ];
+%! HighPrices = [ 1292.6; 1292.1; 1292.5; 1292.3; 1292.2; 1292.2; 1292.7; 
1292.4; 1292.3; 1292.1; 1292.9 ];
+%! LowPrices = [ 1291.3; 1291.3; 1291.7; 1291.1; 1290.7; 1290.2; 1290.3; 
1291.1; 1291.2; 1290.5; 1290.4 ];
+%! ClosePrices = [ 1291.8; 1291.7; 1292.2; 1291.5; 1291.0; 1291.1; 1291.5; 
1291.7; 1291.6; 1290.8; 1292.8 ];
+%! candle( HighPrices, LowPrices, ClosePrices, OpenPrices, 'brk' );
+%! title("default plot with user selected black background");
+
+%!demo 3
+%! close();
+%! OpenPrices = [ 1292.4; 1291.7; 1291.8; 1292.2; 1291.5; 1291.0; 1291.0; 
1291.5; 1291.7; 1291.5; 1290.7 ];
+%! HighPrices = [ 1292.6; 1292.1; 1292.5; 1292.3; 1292.2; 1292.2; 1292.7; 
1292.4; 1292.3; 1292.1; 1292.9 ];
+%! LowPrices = [ 1291.3; 1291.3; 1291.7; 1291.1; 1290.7; 1290.2; 1290.3; 
1291.1; 1291.2; 1290.5; 1290.4 ];
+%! ClosePrices = [ 1291.8; 1291.7; 1292.2; 1291.5; 1291.0; 1291.1; 1291.5; 
1291.7; 1291.6; 1290.8; 1292.8 ];
+%! candle( HighPrices, LowPrices, ClosePrices, OpenPrices, 'brkg' );
+%! title("default color candlestick bodies and user selected background and 
wick colors");
+
+%!demo 4
+%! close();
+%! OpenPrices = [ 1292.4; 1291.7; 1291.8; 1292.2; 1291.5; 1291.0; 1291.0; 
1291.5; 1291.7; 1291.5; 1290.7 ];
+%! HighPrices = [ 1292.6; 1292.1; 1292.5; 1292.3; 1292.2; 1292.2; 1292.7; 
1292.4; 1292.3; 1292.1; 1292.9 ];
+%! LowPrices = [ 1291.3; 1291.3; 1291.7; 1291.1; 1290.7; 1290.2; 1290.3; 
1291.1; 1291.2; 1290.5; 1290.4 ];
+%! ClosePrices = [ 1291.8; 1291.7; 1292.2; 1291.5; 1291.0; 1291.1; 1291.5; 
1291.7; 1291.6; 1290.8; 1292.8 ];
+%! candle( HighPrices, LowPrices, ClosePrices, OpenPrices, 'gmby' );
+%! title("all four colors being user selected");
+
+%!demo 5
+%! close();
+%! OpenPrices = [ 1292.4; 1291.7; 1291.8; 1292.2; 1291.5; 1291.0; 1291.0; 
1291.5; 1291.7; 1291.5; 1290.7 ];
+%! HighPrices = [ 1292.6; 1292.1; 1292.5; 1292.3; 1292.2; 1292.2; 1292.7; 
1292.4; 1292.3; 1292.1; 1292.9 ];
+%! LowPrices = [ 1291.3; 1291.3; 1291.7; 1291.1; 1290.7; 1290.2; 1290.3; 
1291.1; 1291.2; 1290.5; 1290.4 ];
+%! ClosePrices = [ 1291.8; 1291.7; 1292.2; 1291.5; 1291.0; 1291.1; 1291.5; 
1291.7; 1291.6; 1290.8; 1292.8 ];
+%! datenum_vec = [ 7.3702e+05; 7.3702e+05 ;7.3702e+05; 7.3702e+05; 7.3702e+05; 
7.3702e+05; 7.3702e+05; ...
+%! 7.3702e+05; 7.3702e+05; 7.3702e+05; 7.3702e+05 ];
+%! candle( HighPrices, LowPrices, ClosePrices, OpenPrices, 'brwk', 
datenum_vec, "yyyy-mm-dd" );
+%! title("default plot with datenum dates and character dateform arguments");
+
+%!demo 6
+%! close();
+%! OpenPrices = [ 1292.4; 1291.7; 1291.8; 1292.2; 1291.5; 1291.0; 1291.0; 
1291.5; 1291.7; 1291.5; 1290.7 ];
+%! HighPrices = [ 1292.6; 1292.1; 1292.5; 1292.3; 1292.2; 1292.2; 1292.7; 
1292.4; 1292.3; 1292.1; 1292.9 ];
+%! LowPrices = [ 1291.3; 1291.3; 1291.7; 1291.1; 1290.7; 1290.2; 1290.3; 
1291.1; 1291.2; 1290.5; 1290.4 ];
+%! ClosePrices = [ 1291.8; 1291.7; 1292.2; 1291.5; 1291.0; 1291.1; 1291.5; 
1291.7; 1291.6; 1290.8; 1292.8 ];
+%! datenum_vec = [ 7.3702e+05; 7.3702e+05 ;7.3702e+05; 7.3702e+05; 7.3702e+05; 
7.3702e+05; 7.3702e+05; ...
+%! 7.3702e+05; 7.3702e+05; 7.3702e+05; 7.3702e+05 ];
+%! candle( HighPrices, LowPrices, ClosePrices, OpenPrices, 'brk', datenum_vec, 
29 );
+%! title("default plot with user selected black background with datenum dates 
and integer dateform arguments");
+
+%!demo 7
+%! close();
+%! OpenPrices = [ 1292.4; 1291.7; 1291.8; 1292.2; 1291.5; 1291.0; 1291.0; 
1291.5; 1291.7; 1291.5; 1290.7 ];
+%! HighPrices = [ 1292.6; 1292.1; 1292.5; 1292.3; 1292.2; 1292.2; 1292.7; 
1292.4; 1292.3; 1292.1; 1292.9 ];
+%! LowPrices = [ 1291.3; 1291.3; 1291.7; 1291.1; 1290.7; 1290.2; 1290.3; 
1291.1; 1291.2; 1290.5; 1290.4 ];
+%! ClosePrices = [ 1291.8; 1291.7; 1292.2; 1291.5; 1291.0; 1291.1; 1291.5; 
1291.7; 1291.6; 1290.8; 1292.8 ];
+%! datenum_vec = [ 7.3702e+05; 7.3702e+05 ;7.3702e+05; 7.3702e+05; 7.3702e+05; 
7.3702e+05; 7.3702e+05; ...
+%! 7.3702e+05; 7.3702e+05; 7.3702e+05; 7.3702e+05 ];
+%! datevec_vec = datevec( datenum_vec );
+%! candle( HighPrices, LowPrices, ClosePrices, OpenPrices, 'brwk', 
datevec_vec, 23 );
+%! title("default plot with datevec dates and integer dateform arguments");
+
+%!demo 8
+%! close();
+%! OpenPrices = [ 1292.4; 1291.7; 1291.8; 1292.2; 1291.5; 1291.0; 1291.0; 
1291.5; 1291.7; 1291.5; 1290.7 ];
+%! HighPrices = [ 1292.6; 1292.1; 1292.5; 1292.3; 1292.2; 1292.2; 1292.7; 
1292.4; 1292.3; 1292.1; 1292.9 ];
+%! LowPrices = [ 1291.3; 1291.3; 1291.7; 1291.1; 1290.7; 1290.2; 1290.3; 
1291.1; 1291.2; 1290.5; 1290.4 ];
+%! ClosePrices = [ 1291.8; 1291.7; 1292.2; 1291.5; 1291.0; 1291.1; 1291.5; 
1291.7; 1291.6; 1290.8; 1292.8 ];
+%! character_dates = char ( [] );
+%! for i = 1 : 11
+%! character_dates = [ character_dates ; "a date" ] ;
+%! endfor
+%! candle( HighPrices, LowPrices, ClosePrices, OpenPrices, 'brk', 
character_dates );
+%! title("default plot with user selected black background with character 
dates argument");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/cev.m 
new/financial-0.5.1/inst/cev.m
--- old/financial-0.5.0/inst/cev.m      2016-02-01 04:16:35.833625183 +0100
+++ new/financial-0.5.1/inst/cev.m      2017-12-14 21:15:40.781051804 +0100
@@ -17,7 +17,7 @@
 ## @deftypefn  {Function File} {@var{CEV} =} cev (@var{Return}, @var{Alpha}, 
@var{Sigma})
 ## @deftypefnx {Function File} {@var{CEV} =} cev (@var{Return}, @var{Alpha}, 
@var{Sigma}, @var{OptionName}, @var{OptionValue}, @dots{})
 ## Creates an object to represent a constant elasticity of variance (CEV)
-## stochastic differential equation (SDE):
+## stochastic differential equation (SDE).
 ##
 ## @center dX_t = (@var{Return}(t) * X_t)dt + (diag(X_t.^@var{Alpha}(t)) * 
@var{Sigma}(t))dW_t
 ##
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/cir.m 
new/financial-0.5.1/inst/cir.m
--- old/financial-0.5.0/inst/cir.m      2016-02-01 04:16:35.833625183 +0100
+++ new/financial-0.5.1/inst/cir.m      2017-12-14 21:15:40.781051804 +0100
@@ -17,7 +17,7 @@
 ## @deftypefn  {Function File} {@var{CIR} =} cir (@var{Speed}, @var{Level}, 
@var{Sigma})
 ## @deftypefnx {Function File} {@var{CIR} =} cir (@var{Speed}, @var{Level}, 
@var{Sigma}, @var{OptionName}, @var{OptionValue}, @dots{})
 ## Creates an object to represent a Cox-Ingersoll-Ross (CIR) mean-reverting
-## square root diffusion:
+## square root diffusion.
 ##
 ## @center dX_t = (@var{Speed}(t) * (@var{Level}(t) - X_t))dt + 
(diag(X_t.^1/2) * @var{Sigma}(t))dW_t.
 ##
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/daysact.m 
new/financial-0.5.1/inst/daysact.m
--- old/financial-0.5.0/inst/daysact.m  2016-02-01 04:16:35.836958521 +0100
+++ new/financial-0.5.1/inst/daysact.m  2017-12-14 21:15:40.781051804 +0100
@@ -1,4 +1,5 @@
 ## Copyright (C) 2007 David Bateman
+## Copyright (C) 2016 Stefan Schlögl
 ##
 ## This program is free software; you can redistribute it and/or modify it 
under
 ## the terms of the GNU General Public License as published by the Free 
Software
@@ -19,7 +20,7 @@
 ## Calculates the number of days between two dates. If the second date is not
 ## given, calculate the number of days since 1-Jan-0000. The variables @var{d1}
 ## and @var{d2} can either be strings or an @var{n}-row string matrix. If both
-## @var{d1} and @var{d2} are string matrices, then the number of rows must 
+## @var{d1} and @var{d2} are string matrices, then the number of rows must
 ## match. An example of the use of @code{daysact} is
 ##
 ## @example
@@ -34,43 +35,19 @@
 ## @end deftypefn
 
 function days = daysact (d1, d2)
- if (nargin == 1)
-   nr = size (d1, 1);
-   if (nr != 1)
-     days = zeros (nr,1);
-     for i = 1 : nr
-       days (i) = datenum (d1 (i,:));
-     endfor
-   else
-     days = datenum(d1);
-   endif
- elseif (nargin == 2)
-   nr1 = size (d1, 1);
-   nr2 = size (d2, 1);   
-   if (nr1 != nr2 && nr1 != 1 && nr2 != 1)
-     error ("daysact: size mismatch");
-   endif
-   if (nr1 == 1 && nr2 == 1)
-     days = datenum (d2) - datenum(d1);
-   elseif (nr1 == 1)
-     days = zeros (nr2, 1);
-     for i = 1 : nr2
-       days(i) = datenum (d2 (i,:)) - datenum (d1);
-     endfor
-   elseif (nr2 == 1)
-     days = zeros (nr1, 1);
-     for i = 1 : nr1
-       days(i) = datenum (d2) - datenum (d1 (i,:));
-     endfor
-   else
-     days = zeros (nr1, 1);
-     for i = 1 : nr1
-       days(i) = datenum (d2 (i, :)) - datenum (d1 (i,:));
-     endfor
-   endif
- else
-   print_usage();
+  if (nargin == 1)
+    days = datenum (d1);
+  elseif (nargin == 2)
+    nr1 = size (d1, 1);
+    nr2 = size (d2, 1);
+    if (nr1 != nr2 && nr1 != 1 && nr2 != 1)
+      error ("daysact: size mismatch");
+    endif
+    days = datenum (d2) - datenum (d1);
+  else
+    print_usage ();
   endif
 endfunction
 
-%!assert (daysact ("01-Jan-2007", ["10-Jan-2007"; "23-Feb-2007"; 
"23-Jul-2007"]),[9;53;203])
+%!assert (daysact ("01-Jan-2007", ["10-Jan-2007"; "23-Feb-2007"; 
"23-Jul-2007"]), [9;53;203])
+%!assert (daysact ("7-sep-2002", "25-dec-2002"), 109)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/fetch.m 
new/financial-0.5.1/inst/fetch.m
--- old/financial-0.5.0/inst/fetch.m    2016-02-01 04:16:35.840291857 +0100
+++ new/financial-0.5.1/inst/fetch.m    2017-12-14 21:15:40.784385139 +0100
@@ -25,7 +25,7 @@
 ##
 ## @var{fields} are the data fields to download and must come from the
 ## set
-## @itemize @bullet
+## @itemize
 ## @item "Symbol"
 ## @item "Last"
 ## @item "Date"
@@ -49,13 +49,17 @@
 ## @var{period} (default: "d") allows you to select the period for the
 ## data which can be any of the below as long as they are supported by
 ## the associated backend.
-## @itemize @bullet
+## @itemize
 ## @item 'd': daily
 ## @item 'w': weekly (Yahoo only)
 ## @item 'm': monthly (Yahoo only)
 ## @item 'v': dividends (Yahoo only)
 ## @end itemize
 ##
+## @example
+## fetch(google(), "SNE", "01-Jan-2016", "31-Dec-2016", "d");
+## @end example
+##
 ## @seealso{yahoo, google}
 ## @end deftypefn
 
@@ -130,20 +134,24 @@
 
 endfunction
 
-%!shared fgood, dgood
-%! fgood = {"Date", "Open", "High", "Low", "Close", "Volume", "Adj Close"};
-%! dgood = [732501,34.77,34.87,34.25,34.62,15515400,34.62;
-%!          732500,33.87,34.77,33.72,34.63,16354300,34.63;
-%!          732499,34.64,34.97,34.03,34.12,13585700,34.12;
-%!          732498,34.25,35.08,34.20,34.60,16086700,34.60;
-%!          732494,34.76,34.85,34.22,34.44,9861600,34.44];
+%!shared fgood, dgood, wgood
+%! fgood = {"Date", "Open", "High", "Low", "Close", "Volume"};
+%! dgood = [732501,34.77,34.87,34.25,34.62,15520553;
+%!          732500,33.87,34.77,33.72,34.63,16360297;
+%!          732499,34.64,34.97,34.03,34.12,13694806;
+%!          732498,34.25,35.08,34.20,34.60,16103029;
+%!          732494,34.76,34.85,34.22,34.44,9875220];
+%! wgood = [732501,34.25,35.08,33.72,34.62,60859400;
+%!          732494,35.88,36.24,34.22,34.44,67132100];
+%!test
+%! [d f] = fetch (google(), "yhoo", 732494, 732501, "d");
+%! assert(d, dgood, eps);
+%! assert(f, fgood, eps);
+## test that the automatic period works
+%!test
+%! [d f] = fetch (google(), "yhoo", 732494, 732501);
+%! assert(d, dgood, eps);
+%! assert(f, fgood, eps);
+## Test that weekly fails
 %!test
-%! [d f] = fetch(yahoo(), "yhoo", "01-Jul-2005", "10-Jul-2005");
-%! assert(d, dgood, 1e-5);
-%! assert(f, fgood, 1e-5);
-
-## The test below fails because yahoo gives a different volume on 732498
-##%!xtest
-##%! [d f] = fetch(yahoo(), "yhoo", "01-Jul-2005", "10-Jul-2005", "w");
-##%! assert(d, dgood(4:5,:), 1e-5);
-##%! assert(f, fgood, 1e-5);
+%! fail ('fetch (google(), "yhoo", 732494, 732501, "w")', ".*weekly.*")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/gbm.m 
new/financial-0.5.1/inst/gbm.m
--- old/financial-0.5.0/inst/gbm.m      2016-02-01 04:16:35.840291857 +0100
+++ new/financial-0.5.1/inst/gbm.m      2017-12-14 21:15:40.784385139 +0100
@@ -16,7 +16,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{GBM} =} gbm (@var{Return}, @var{Sigma})
 ## @deftypefnx {Function File} {@var{GBM} =} gbm (@var{Return}, @var{Sigma}, 
@var{OptionName}, @var{OptionValue}, @dots{})
-## Creates an object to represent a geometric Brownian motion (GBM):
+## Creates an object to represent a geometric Brownian motion (GBM).
 ##
 ## @center dX_t = (@var{Return}(t) * X_t)dt + (diag(X_t) * @var{Sigma}(t))dW_t
 ##
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/heston.m 
new/financial-0.5.1/inst/heston.m
--- old/financial-0.5.0/inst/heston.m   2016-02-01 04:16:35.840291857 +0100
+++ new/financial-0.5.1/inst/heston.m   2017-12-14 21:15:40.787718473 +0100
@@ -16,7 +16,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{heston} =} heston (@var{Return}, 
@var{Speed}, @var{Level}, @var{Volatility})
 ## @deftypefnx {Function File} {@var{heston} =} heston (@var{Return}, 
@var{Speed}, @var{Level}, @var{Volatility}, @var{OptionName}, 
@var{OptionValue}, @dots{})
-## Creates an object to represent a Heston stochastic volatility model:
+## Creates an object to represent a Heston stochastic volatility model.
 ##
 ## @center dX_1 = (@var{Return}(t) * X_1)dt + (sqrt (X_2) * X_1)dW_1;
 ## @center dX_2 = (@var{Speed}(t) * (@var{Level}(t) - X_2))dt + (sqrt (X_2) * 
@var{Volatility}(t))dW_2.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/hwv.m 
new/financial-0.5.1/inst/hwv.m
--- old/financial-0.5.0/inst/hwv.m      2016-02-01 04:16:35.843625194 +0100
+++ new/financial-0.5.1/inst/hwv.m      2017-12-14 21:15:40.787718473 +0100
@@ -16,7 +16,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{HWV} =} hwv (@var{Speed}, @var{Level}, 
@var{Sigma})
 ## @deftypefnx {Function File} {@var{HWV} =} hwv (@var{Speed}, @var{Level}, 
@var{Sigma}, @var{OptionName}, @var{OptionValue}, @dots{})
-## Creates an object to represent a Hull-White/Vasicek (HWV) diffusion:
+## Creates an object to represent a Hull-White/Vasicek (HWV) diffusion.
 ##
 ## @center dX_t = (@var{Speed}(t) * (@var{Level}(t) - X_t))dt + 
@var{Sigma}(t)dW_t.
 ##
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/opprofit.m 
new/financial-0.5.1/inst/opprofit.m
--- old/financial-0.5.0/inst/opprofit.m 2016-02-01 04:16:35.850291867 +0100
+++ new/financial-0.5.1/inst/opprofit.m 2017-12-14 21:15:40.794385141 +0100
@@ -17,7 +17,7 @@
 ## @deftypefn  {Function File} {@var{Profit} =} opprofit (@var{AssetPrice}, 
@var{Strike}, @var{Cost}, @var{PosFlag}, @var{OptType})
 ## Compute profit of an option.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{AssetPrice} The price of the underlying asset at the expiry 
time.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/private/blscheck.m 
new/financial-0.5.1/inst/private/blscheck.m
--- old/financial-0.5.0/inst/private/blscheck.m 2016-02-01 04:16:35.853625205 
+0100
+++ new/financial-0.5.1/inst/private/blscheck.m 2017-12-14 21:15:40.797718475 
+0100
@@ -19,7 +19,7 @@
 ## @deftypefnx {Function File} {[@var{Call}, @var{Put}] =} blscheck 
(@var{Price}, @var{Strike}, @var{Rate}, @var{Time}, @var{Volatility}, 
@var{Yield})
 ## Performs input checking for the bls* functions.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Parent} The calling function.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/private/fetch_google.m 
new/financial-0.5.1/inst/private/fetch_google.m
--- old/financial-0.5.0/inst/private/fetch_google.m     2016-02-01 
04:16:35.853625205 +0100
+++ new/financial-0.5.1/inst/private/fetch_google.m     2017-12-14 
21:15:40.797718475 +0100
@@ -27,7 +27,7 @@
 ##
 ## @var{period} (default: "d") allows you to select the period for the
 ## data which can be any of
-## @itemize @bullet
+## @itemize
 ## @item 'd': daily
 ## @end itemize
 ##
@@ -64,13 +64,15 @@
     endif
     d = csv2cell (f);
     d{1,1} = d{1,1}(4:end); # Remove byte order mark (BOM)
-    unlink(f);
+    unlink (f);
     ## Pull off the header
     fields = d(1,:);
     d(1,:) = [];
     ## Put the dates into datenum format
-    data = [datenum(datevec(d(:,1), "dd-mmm-yy")), ...
-            cell2mat(d(:,2:end))];
+    dates = datenum (datevec (d(:,1), "dd-mmm-yy"));
+    ternary = @(c, varargin) varargin{2-logical(c)};
+    filtered = cellfun (@(x) ternary(x == "-", NaN, x), d(:, 2:end));
+    data = [dates, filtered];
     ## Note that google appears to have an off-by-one error in
     ## returning historical data, so make sure that we only return the
     ## requested data and not what Google sent.
@@ -81,24 +83,3 @@
 
 endfunction
 
-%!shared fgood, dgood, wgood
-%! fgood = {"Date", "Open", "High", "Low", "Close", "Volume"};
-%! dgood = [732501,34.77,34.87,34.25,34.62,15520553;
-%!          732500,33.87,34.77,33.72,34.63,16360297;
-%!          732499,34.64,34.97,34.03,34.12,13694806;
-%!          732498,34.25,35.08,34.20,34.60,16103029;
-%!          732494,34.76,34.85,34.22,34.44,9875220];
-%! wgood = [732501,34.25,35.08,33.72,34.62,60859400;
-%!          732494,35.88,36.24,34.22,34.44,67132100];
-%!test
-%! [d f] = fetch_google (google(), "yhoo", 732494, 732501, "d");
-%! assert(d, dgood, eps);
-%! assert(f, fgood, eps);
-## test that the automatic period works
-%!test
-%! [d f] = fetch_google (google(), "yhoo", 732494, 732501);
-%! assert(d, dgood, eps);
-%! assert(f, fgood, eps);
-## Test that weekly fails
-%!test
-%! fail ('fetch_google (google(), "yhoo", 732494, 732501, "w")', ".*weekly.*")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/private/fetch_yahoo.m 
new/financial-0.5.1/inst/private/fetch_yahoo.m
--- old/financial-0.5.0/inst/private/fetch_yahoo.m      2016-02-01 
04:16:35.853625205 +0100
+++ new/financial-0.5.1/inst/private/fetch_yahoo.m      2017-12-14 
21:15:40.797718475 +0100
@@ -27,7 +27,7 @@
 ##
 ## @var{period} (default: "d") allows you to select the period for the
 ## data which can be any of
-## @itemize @bullet
+## @itemize
 ## @item 'd': daily
 ## @item 'w': weekly
 ## @item 'm': monthly
@@ -43,6 +43,8 @@
 function [data fields] = fetch_yahoo (conn=[], symbol="",
                                           fromdate, todate, period="d")
 
+  error ("Yahoo! Finance no longer supports downloading stock data");
+
   pkg load io;
 
   if strcmpi (conn.url, "http://quote.yahoo.com";)
@@ -54,6 +56,7 @@
                          symbol, todate(2)-1, todate(3), todate(1),
                          period,
                          fromdate(2)-1, fromdate(3), fromdate(1));
+    disp(geturl);
     ## FIXME: This would be more efficient if csv2cell could work on
     ## strings instead of files.
     [f, success, msg] = urlwrite (geturl, tmpnam ());
@@ -76,25 +79,3 @@
 
 endfunction
 
-%!shared fgood, dgood
-%! fgood = {"Date", "Open", "High", "Low", "Close", "Volume", "Adj Close"};
-%! dgood = [732501,34.77,34.87,34.25,34.62,15515400,34.62;
-%!          732500,33.87,34.77,33.72,34.63,16354300,34.63;
-%!          732499,34.64,34.97,34.03,34.12,13585700,34.12;
-%!          732498,34.25,35.08,34.20,34.60,16086700,34.60;
-%!          732494,34.76,34.85,34.22,34.44,9861600,34.44];
-%!test
-%! [d f] = fetch_yahoo (yahoo(), "yhoo", 732494, 732501, "d");
-%! assert(d, dgood, 1e-5);
-%! assert(f, fgood, 1e-5);
-## test that the automatic period works
-%!test
-%! [d f] = fetch_yahoo (yahoo(), "yhoo", 732494, 732501);
-%! assert(d, dgood, 1e-5);
-%! assert(f, fgood, 1e-5);
-
-## The test below fails because yahoo gives a different volume on 732498
-##%!xtest
-##%! [d f] = fetch(yahoo(), "yhoo", "01-Jul-2005", "10-Jul-2005", "w");
-##%! assert(d, dgood(4:5,:), 1e-5);
-##%! assert(f, fgood, 1e-5);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/renko.m 
new/financial-0.5.1/inst/renko.m
--- old/financial-0.5.0/inst/renko.m    2016-02-01 04:16:35.856958541 +0100
+++ new/financial-0.5.1/inst/renko.m    2017-12-14 21:15:40.797718475 +0100
@@ -18,7 +18,7 @@
 ## @deftypefnx {Function File} renko (@var{X}, @var{threshold})
 ## Plots price changes using a Renko chart.
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{X} An M-by-2 matrix in which the first column contains 
datenum
 ## bers and the second contains prices.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/sdeddo.m 
new/financial-0.5.1/inst/sdeddo.m
--- old/financial-0.5.0/inst/sdeddo.m   2016-02-01 04:16:35.856958541 +0100
+++ new/financial-0.5.1/inst/sdeddo.m   2017-12-14 21:15:40.801051809 +0100
@@ -17,16 +17,16 @@
 ## @deftypefn  {Function File} {@var{SDE} =} sdeddo (@var{DriftRate}, 
@var{DiffusionRate})
 ## @deftypefnx {Function File} {@var{SDE} =} sdeddo (@var{DriftRate}, 
@var{DiffusionRate}, @var{OptionName}, @var{OptionValue}, @dots{})
 ## Creates an object to represent a stochastic differential equation (SDE) 
using
-## drift and diffusion objects:
+## drift and diffusion objects.
 ##
 ## @center dX_t = @var{DriftRate}(t, X_t)dt + @var{DiffusionRate}(t, X_t)dW_t.
 ##
-## @itemize @bullet
+## @itemize
 ## @item (X_t) is an NVARS-dimensional process;
 ## @item (W_t) is an NBROWNS-dimensional Wiener process.
 ## @end itemize
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{DriftRate} A drift object.
 ## @item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/sdeld.m 
new/financial-0.5.1/inst/sdeld.m
--- old/financial-0.5.0/inst/sdeld.m    2016-02-01 04:16:35.856958541 +0100
+++ new/financial-0.5.1/inst/sdeld.m    2017-12-14 21:15:40.801051809 +0100
@@ -17,11 +17,11 @@
 ## @deftypefn  {Function File} {@var{SDE} =} sdeld (@var{A}, @var{B}, 
@var{Alpha}, @var{Sigma})
 ## @deftypefnx {Function File} {@var{SDE} =} sdeld (@var{A}, @var{B}, 
@var{Alpha}, @var{Sigma}, @var{OptionName}, @var{OptionValue}, @dots{})
 ## Creates an object to represent a stochastic differential equation (SDE) in
-## linear drift-rate form:
+## linear drift-rate form.
 ##
 ## @center dX_t = (@var{A}(t) + @var{B}(t) * X_t)dt + 
(diag(X_t.^@var{Alpha}(t)) * @var{Sigma}(t))dW_t
 ##
-## @itemize @bullet
+## @itemize
 ## @item (X_t) is an NVARS-dimensional process;
 ## @item (W_t) is an NBROWNS-dimensional Wiener process.
 ## @end itemize
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/sdemrd.m 
new/financial-0.5.1/inst/sdemrd.m
--- old/financial-0.5.0/inst/sdemrd.m   2016-02-01 04:16:35.856958541 +0100
+++ new/financial-0.5.1/inst/sdemrd.m   2017-12-14 21:15:40.801051809 +0100
@@ -17,16 +17,16 @@
 ## @deftypefn  {Function File} {@var{SDE} =} sdemrd (@var{Speed}, @var{Level}, 
@var{Alpha}, @var{Sigma})
 ## @deftypefnx {Function File} {@var{SDE} =} sdemrd (@var{Speed}, @var{Level}, 
@var{Alpha}, @var{Sigma}, @var{OptionName}, @var{OptionValue}, @dots{})
 ## Creates an object to represent a stochastic differential equation (SDE) in
-## in mean-reverting drift-rate form:
+## in mean-reverting drift-rate form.
 ##
 ## @center dX_t = (@var{Speed}(t) * (@var{Level}(t) - X_t))dt + 
(diag(X_t.^@var{Alpha}(t)) * @var{Sigma}(t))dW_t.
 ##
-## @itemize @bullet
+## @itemize
 ## @item (X_t) is an NVARS-dimensional process;
 ## @item (W_t) is an NBROWNS-dimensional Wiener process.
 ## @end itemize
 ##
-## @itemize @minus{}@minus{}
+## @itemize
 ## @item
 ## Variable: @var{Speed} An NVARS-by-NVARS matrix or a function. As a function,
 ## @var{Speed} returns an NVARS-by-NVARS matrix and has either exactly one 
input
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/financial-0.5.0/inst/yeardays.m 
new/financial-0.5.1/inst/yeardays.m
--- old/financial-0.5.0/inst/yeardays.m 2016-02-01 04:16:35.860291878 +0100
+++ new/financial-0.5.1/inst/yeardays.m 2017-12-14 21:15:40.804385144 +0100
@@ -20,7 +20,7 @@
 ## @var{b}.
 ##
 ## Valid bases
-## @itemize @bullet
+## @itemize
 ## @item 0
 ##   actual/actual (default)
 ## @item 1


Reply via email to