Blockchain and Financial Industry

Blockchain

According to IBM, “Blockchain is a shared, immutable ledger that facilitates recording transactions and tracking assets in a business network. An asset either be tangible (a house, car, cash, and) or intangible (intellectual property, patents, copyrights, and branding)”. 

In other words, blockchain is a method of storing assets required in a business environment for future use in which there is no chance to lose and change the information stored in it. 

In the block of the chain, every block contains information in which two layers of ownership are established- one is who owns the current data, and another is the previous owner. 

Blockchain offers virtual security, transparency, trust, privacy, and high performance at a significantly low cost. Especially in the financial sector, it was estimated that at the end of 2030, the development of blockchain will save up to $27 billion in cross-border transactions.

Blockchain in the Financial Industry

Blockchain technology has a feature that applies in almost all industries, from the primary sector to the supply chain in manufacturing industries to the tertiary sector.

Blockchain can change bank and financial services to a great extent. For the client prospect, it helps to make the prompt transfer of money from one account to another worldwide in a minimal period. The cost associated with this service is negligible and eliminates the chance of hacking. Moreover, it offers services without middlemen.

Due to the decentralization of the banking sector in recent years, the demand for highly encrypted data generation, protection, and storage became possible through blockchain technology. This technology made cross-border transactions quick and secure.

Blockchain deals with peer-to-peer lending, insurance, real-time payment, trade finance, compliance, and mainstream banking solution. This has improved the settlement cost with a secured and proficient payment method.

This technology generated the crypto-currency, which helps to connect the financial market with digital wallets. Bitcoin is an example that has been considered globally as a means of transferring value from one client to another.

Record keeping system in blockchain establishes a robust mechanism for data protection and protects companies from facing false claims. This could be the front hand to speed up the payment release process to the service providers.

Real estate is also using this technology to protect information about clients. Through this technology, their ownership transfer records and financial profile verification reduces the paperwork and save cost for doing these deeds.

Blockchain technology has created a large scope of crypto-currency. A new financial process like Initial Coin Offering (ICO) is seen as a lucrative tool to connect many investors around the globe. Generate funding for investment projects from unknown investors with their reciprocal return agreement that can be done with the help of blockchain.


Thank you!

Forecasting with ARIMA: R Code

Step-1: ###R Packages Installed

library(fpp2)

library(readxl)

library(SPlit)

library(fpp2)

 

###Declare time-series data

###In this study I have file naming as HPI_AUS. All the date excel format.

HPI_AUS <-ts(AUSHPI[,2], start=c(2002,3), frequency=4)

 

Step-3: ###While forecasting, first that should be done within the sample, and if it is found valid, then only we forrecast out of sample.

###Split the given data into the training and test sets

split_HPI_AUS <- ts_split(ts.obj = HPI_AUS, sample.out= 8)

training <- split_AUSHPI$train

testing <- split_AUSHPI$test

length(training)

length(testing)


 Step-4:###Select the appropriate forecasting tool. Here I have used ARIMA (easy and quick model)

###ARIMA In-sample testing

arima_diag(training)

 

 

###Model forecasting In-sample

arima1 <- auto.arima(training, seasonal= TRUE)

autoplot(arima1)

check_res(arima1)

 

###Forecasting In-sample

fcast1<- forecast(arima1, h=8)

test_forecast(actual=HPI_AUS, forecast.obj = fcast1, test = testing)

accuracy(fcast1, testing)

 

###Auto ARIMA model Out of Sample

arima_diag(HPI_AUS)

fit_arima <- auto.arima(HPI_AUS, seasonal = TRUE )

autoplot(fit_arima)

check_res(fit_arima)

 

###Forecasting Out of Sample

fcast1 <- forecast(HPI_AUS, model = fit_arima, h=8)

plot_forecast(fcast1)

summary(fcast1)

 

###Do we have any option to validate the Forecasting Result?

Box.test(resid(fcast1), lag=1, type = "Ljung-Box")

Box.test(resid(fcast1), lag=5, type = "Ljung-Box")

Box.test(resid(fcast1), lag=10, type = "Ljung-Box")

Box.test(resid(fcast1), lag=15, type = "Ljung-Box")

Box.test(resid(fcast1), lag=20, type = "Ljung-Box")

Thank you

Inflation is a Hidden form of Tax in Nepal: A Granger Causality Test

Abstract 

Inflation is taken as a secret form of taxing people, thus in literature it is also known as an indirect form of tax. This has been tested by using the secondary data since 1975 to 2010 on government tax revenue (GTAX) and national consumer price index (NCPI) of Nepal. Initially, ADF test, then Granger Causality and finally OLS has been conducted. Granger Causality has suggested that NCPI causes GTAX which helped later to consider NCPI as an independent variable and GTAX as a dependent variable. After conducting OLS test it is found that NCPI impacts GTAX directly (Acharya, 2014). 

Key Words: Inflation, Tax, Granger Causality and OLS. 

Reference:

Acharya, S. (2014). Inflation is a hidden form of tax in Nepal: Granger Causality test. Khwopa Journal, 1(1), 61–75.

Four Growth Theories

Keynesian Economics

Golden Section Search Method: Fortran f90

Consider the nonlinear equation f(x)=4x2 –exp(x). Write a Fortran program that uses the Golden Section Search Method to find the solution accurate to within 10-6 for the nonlinear equation on [4,8]. 

Sauce Code:

Program  Assignmentq2

implicit none

real:: f

real::x, r, q1, q2,a, b, tol=1.0e-6

!Define Interval and Function

f(x) = 4*x**2-exp(x)

a=4

b=8

print*, "a", a, "b", b

!Evaluation of the function at the end point

r=(sqrt(5.0)-1)/2

q1=b-r*(b-a)

q2=a+r*(b-a)

 print*, "q1",q1, "q2", q2

 ! Creating Loop

!if ((b-a)<=tol) stop

do while ((b-a)>tol)

     !if(f(a)*f(b)<=0) then

     if(f(a)*f(q2)<=0) then

         b=q2

         q2=q1

         q1=b-r*(b-a)

     else

         a=q1

         q1=q2

         q2=a+r*(b-a)

    print*, "q1",q1, "q2", q2, "a", a, "b", b

     end if 

     end do

end program assignmentq2 

Gaussian Elimination Method: Fortran f90

 Question:

Solve the following system of linear equations using Gaussian Elimination using Fortran.

x1 + x2 - x3 + x4 - x5 = 2

2x1+ 2 x2 + x3 - x4 + x5 = 4

3x1 + x2-3 x3 -2x4+ 3 x5 = 8

4x1 + x2 - x3 +4 x4 -5x5 =16

16x1 -x2 + x3 - x4 - x5 =32

 

Solution:

program main

implicit none

integer, parameter :: n=5

double precision:: a(n,n), b(n), x(n)

integer:: i,j

! matrix A

  data (a(1,i), i=1,5) /  1.0,  1.0,  -1.0, 1.0, -1.0 /

  data (a(2,i), i=1,5) /  2.0,  2.0,  1.0, -1.0, 1.0 /

  data (a(3,i), i=1,5) /  3.0,  1.0,  -3.0, -2.0, 3.0 /

  data (a(4,i), i=1,5) /  4.0,  1.0,  -1.0, 4.0, -5.0 /

  data (a(5,i), i=1,5) /  16.0, -1.0, 1.0, -1.0, -1.0 /

! matrix b

  data (b(i),   i=1,5) /  2.0, 4.0, 8.0, 16.0, 32.0 /


! print a header and the original equations

  write (*,200)

  do i=1,n

     write (*,201) (a(i,j),j=1,n), b(i)

  end do


  call gauss_2(a,b,x,n)


! print matrix A and vector b after the elimination 

  write (*,202)

  do i = 1,n

     write (*,201)  (a(i,j),j=1,n), b(i)

  end do

! print solutions

  write (*,203)

  write (*,201) (x(i),i=1,n)

200 format (' Gauss elimination with scaling and pivoting ' &

    ,/,/,' Matrix A and vector b')

201 format (6f12.6)

202 format (/,' Matrix A and vector b after elimination')

203 format (/,' Solutions x(n)')

end

subroutine gauss_2(a,b,x,n)

implicit none 

integer:: n

double precision:: a(n,n), b(n), x(n)

double precision:: s(n)

double precision:: c, pivot, store

integer:: i, j, k, l


! step 1: begin forward elimination

do k=1, n-1


! step 2: "scaling"

! s(i) will have the largest element from row i 

  do i=k,n                       

    s(i) = 0.0

    do j=k,n                    

      s(i) = max(s(i),abs(a(i,j)))

    end do

  end do


! "pivoting 1" 

! row with the largest pivoting element

  pivot = abs(a(k,k)/s(k))

  l = k

  do j=k+1,n

    if(abs(a(j,k)/s(j)) > pivot) then

      pivot = abs(a(j,k)/s(j))

      l = j

    end if

  end do


! Check if the system has a sigular matrix

  if(pivot == 0.0) then

    write(*,*) ' The matrix is sigular '

    return

  end if


! "pivoting 2" interchange rows k and l (if needed)

if (l /= k) then

  do j=k,n

     store = a(k,j)

     a(k,j) = a(l,j)

     a(l,j) = store

  end do

  store = b(k)

  b(k) = b(l)

  b(l) = store

end if


! elimination (after scaling and pivoting)

   do i=k+1,n

      c=a(i,k)/a(k,k)

      a(i,k) = 0.0

      b(i)=b(i)- c*b(k)

      do j=k+1,n

         a(i,j) = a(i,j)-c*a(k,j)

      end do

   end do

end do


! backward substitution 

x(n) = b(n)/a(n,n)

do i=n-1,1,-1

   c=0.0

   do j=i+1,n

     c= c + a(i,j)*x(j)

   end do 

   x(i) = (b(i)- c)/a(i,i)

end do

end subroutine gauss_2